I am not sure whether this problem has been solved or not. But following code snippet shows how to remove a field whose key is xxx from JSON node. And a JsonNode cannot perform insertion or deletion, so you have to cast it to ObjectNode for further manipulation.

Code snippet

 ObjectMapper mapper = new ObjectMapper();
 JsonNode rootNode = mapper.readTree(jsonStr);
 rootNode.get("arrayNode").forEach(e -> {
     if (e.has("xxx")) {
         ObjectNode objNode = (ObjectNode) e;
         objNode.remove("xxx");
     }
 });

 System.out.println(rootNode.toString());

Console output

{"arrayNode":[{"yyy":{}},{"yyy":{}}]}

Answer from LHCHIN on Stack Overflow
🌐
Tabnine
tabnine.com › home page › code › java › com.fasterxml.jackson.databind.node.arraynode
com.fasterxml.jackson.databind.node.ArrayNode.remove java code examples | Tabnine
@Override public void remove(List<String> path) { if (path.isEmpty()) { error(Operation.REMOVE, "path is empty"); } else { JsonNode parentNode = getParentNode(path, Operation.REMOVE); String fieldToRemove = path.get(path.size() - 1).replaceAll("\"", ""); if (parentNode.isObject()) ((ObjectNode) parentNode).remove(fieldToRemove); else if (parentNode.isArray()) ((ArrayNode) parentNode).remove(arrayIndex(fieldToRemove, parentNode.size() - 1, flags.contains(CompatibilityFlags.REMOVE_NONE_EXISTING_ARRAY_ELEMENT))); else error(Operation.REMOVE, "noSuchPath in source, path provided : " + PathUtils.getPathRepresentation(path)); } }
Discussions

Removing an element from an Array (Java) - Stack Overflow
Is there any fast (and nice looking) way to remove an element from an array in Java? More on stackoverflow.com
🌐 stackoverflow.com
DocumentContext.delete removes extra elements from array
Hi! I have created ObjectNode having link to the same ArrayNode twice. When I run DocumentContext.delete to delete an element from array, it tries to remove element from the same array with the sam... More on github.com
🌐 github.com
1
December 23, 2020
java - Remove object from JSON array - Stack Overflow
final JsonNode json = ... i = json.elements(); i.hasNext(); ) { final JsonNode jsonNode = i.next(); if ("1".equals(jsonNode.get("name").asText())) { i.remove(); } } } This will not create a new instance. The original TreeNode (which is an ArrayNode) is ... More on stackoverflow.com
🌐 stackoverflow.com
java - How to remove empty node in JsonNode - Stack Overflow
How can I get json without empty array elements, i.e. ... There are tons of JSON libraries out there. Which one do you use? ... Ömer Erden, can you show example. please. what do you mean. ... As I pointed in comment you need to remove arrayNode variable(which must be named as arrayElementNode ) from ... More on stackoverflow.com
🌐 stackoverflow.com
July 16, 2017
🌐
GeeksforGeeks
geeksforgeeks.org › java › remove-an-element-at-specific-index-from-an-array-in-java
Remove an Element at Specific Index from an Array in Java - GeeksforGeeks
July 11, 2025 - The basic approach to remove an element at a specific index is using a loop. ... // Java program to remove an element // from a specific index from an array // using loop import java.util.Arrays; class Main { public static int[] remove(int[] ...
🌐
GitHub
github.com › json-path › JsonPath › issues › 656
DocumentContext.delete removes extra elements from array · Issue #656 · json-path/JsonPath
December 23, 2020 - As a result, extra element is removed. ... updateOperations = {ArrayList@1389} size = 2 0 = {PathRef$ArrayIndexPathRef@1365} index = 0 parent = {ArrayNode@1383} "[{"name":"nOne"},{"name":"nTwo"},{"name":"nThree"}]" 1 = {PathRef$ArrayIndexPathRef@1396} index = 0 parent = {ArrayNode@1383} "[{"name":"nOne"},{"name":"nTwo"},{"name":"nThree"}]"
Author   iruno
🌐
How to do in Java
howtodoinjava.com › home › java array › removing items from an array in java
Removing Items from an Array in Java
February 10, 2022 - Learn to remove the array items in Java by the index positions as well as the item values using ArrayUtils, Collections APIs and custom code.
Find elsewhere
🌐
Software Testing Help
softwaretestinghelp.com › home › java › remove/delete an element from an array in java
Remove/Delete An Element From An Array In Java
April 1, 2025 - Using Java8 streams, we can delete an element from an array. In order to do this, first, the array is converted to a stream. Then the element at the specified index is deleted using the filter method of streams.
🌐
DigitalOcean
digitalocean.com › community › tutorials › java-remove-array-elements
Java Remove Array Elements: Methods and Examples | DigitalOcean
May 2, 2025 - On the other hand, it makes it challenging to dynamically modify the array, such as removing elements, as the size of the array cannot be changed once it is created. Unlike some other programming languages, Java does not provide a built-in method to remove elements from an array.
🌐
Adobe Developer
developer.adobe.com › experience-manager › reference-materials › 6-5 › javadoc › com › fasterxml › jackson › databind › node › ArrayNode.html
ArrayNode (The Adobe AEM Quickstart and Web Application.)
If index is 0 or less, it will be inserted as the first element; if >= size(), appended at the end, and otherwise inserted before existing element in specified index. No exceptions are thrown for any index. ... Method for removing an entry from this ArrayNode.
🌐
Fasterxml
fasterxml.github.io › jackson-databind › javadoc › 2.6 › com › fasterxml › jackson › databind › node › ArrayNode.html
ArrayNode (jackson-databind 2.6.0 API)
If index is 0 or less, it will be inserted as the first element; if >= size(), appended at the end, and otherwise inserted before existing element in specified index. No exceptions are thrown for any index. ... Method for removing an entry from this ArrayNode.
🌐
TutorialsPoint
tutorialspoint.com › java_data_structures › java_data_structures_remove_elements_from_array.htm
Remove Elements from Arrays
The ArrayUtils class provide remove() method to delete an element from an array. import java.util.Scanner; import org.apache.commons.lang3.ArrayUtils; public class RemovingElements { public static void main(String args[]) { Scanner sc = new ...
🌐
Stack Overflow
stackoverflow.com › questions › 59348581 › how-can-i-remove-an-element-from-array-in-java
How can i remove an element from array in Java - Stack Overflow
To remove an element from an array in Java, you need to create a new array and copy over all the elements you want to keep.
🌐
Reddit
reddit.com › r › AskProgramming › comments › krzep7 › java_remove_element_from_array
Java - Remove element from array? : r/AskProgramming
January 6, 2021 - public void removeDog(Dog d) { Dog[] copyOfArr = Arrays.copyOf(dogsOwned, dogsOwned.length - 1); for (int i = 0; i < dogsOwned.length; i++) { if (!dogsOwned[i].equals(d)) { copyOfArr[i] = dogsOwned[i]; dogsOwned = copyOfArr; } } }
🌐
LeetCode
leetcode.com › problems › remove-element
Remove Element - LeetCode
Remove Element - Given an integer array nums and an integer val, remove all occurrences of val in nums in-place [https://en.wikipedia.org/wiki/In-place_algorithm]. The order of the elements may be changed.
🌐
Adobe Developer
developer.adobe.com › experience-manager › reference-materials › cloud-service › javadoc › com › fasterxml › jackson › databind › node › ArrayNode.html
ArrayNode (The Adobe Experience Manager SDK 2022.11.9850.20221116T162329Z-220900)
If index is 0 or less, it will be inserted as the first element; if >= size(), appended at the end, and otherwise inserted before existing element in specified index. No exceptions are thrown for any index. ... Method for removing an entry from this ArrayNode.