I need to change a JSON attribute's value in Java, I can get the value properly but I couldn't modify the JSON.
here is the code below
  JsonNode blablas = mapper.readTree(parser).get("blablas");
    for (JsonNode jsonNode : blablas) {
        String elementId = jsonNode.get("element").asText();
        String value = jsonNode.get("value").asText();
        if (StringUtils.equalsIgnoreCase(elementId, "blabla")) {
            if(value != null && value.equals("YES")){
                 // I need to change the node to NO then save it into the JSON
            }
        }
    }
What is the best way to do this?
 
     
     
     
     
     
     
     
     
     
     
    