I have got a JsonNode like the below
"{"Pink":["#000000"],"Red":["#000000"],"Blue":["#000000"],"Orange":["#000000"]}"
and I am trying to get the value for Pink for e.g like this
jsonNode.get("Pink").asText()
But this isn't working - is there another way that I can access these values through Java?
It looks like your problem here is that "Pink" is an array and not a string. The solution here is to either remove the square brackets, or if that is not possible, the following should give you the expected result: