Skip to content

Conversation

@rbygrave
Copy link
Contributor

Example .extractNode("person")

    JsonArray arrayWithNestedPerson = (JsonArray) object.get("people");

    List<JsonNode> peopleNodes =
      arrayWithNestedPerson.stream()
      .filter(node -> "family".equals(node.extract("type")))
      .map(node -> node.extractNode("person")). // <!-- HERE ... .extractNode("person")
      .collect(Collectors.toList());

@rbygrave rbygrave self-assigned this Dec 12, 2024
@rbygrave rbygrave requested a review from SentryMan December 12, 2024 04:28
@rbygrave rbygrave added this to the 3.0 milestone Dec 12, 2024
@rbygrave rbygrave merged commit a19c79f into main Dec 12, 2024
9 checks passed
@rbygrave rbygrave deleted the feature/json-node-extractNode branch December 12, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants