0

So I'm having a minor issue, thinking of what is the easiest way to do this. Basically I have the following JSON:

{
  "users": {
    "userId1": {
      "externalUser.userId": "uid1",
      "externalUser.profileId": "pid1"
    }
  },
  "externalAccount.id": "acid1"
}

And I want to convert it to a map looking like this:

"externalAccount.id", "acid1"
"users.userId1.externalUser.userId", "uid1"
"users.userId1.externalUser.profileId", "pid1"

And of course the conversion has to work both ways. I was thinking of finding some way to use jackson to do that, because I know we can do it with jsonpath but I don't know how.

nxn
  • 89
  • 1
  • 10

0 Answers0