https://kotlinlang.org logo
#getting-started
Title
# getting-started
h

He

05/31/2023, 2:41 PM
Using JsonNode or ObjectNode, how can i remove an item from a nested list if found? Lets say I have this JSON
Copy code
{
  "A": "Test",
  "someNode": {
    "X": "Test",
    "myList": [
      "RemoveThis",
      "DontRemove"
    ]
  }
}
How can I remove
RemoveThis
? I have a list of words I essentially want to filter out at some point, but I can't seem to find a way to remove the nested list's elements. I can remove other properties with
remove()
method, but can't do that to the list
y

Youssef Shoaib [MOD]

05/31/2023, 3:32 PM
59 Views