-1

let's say I have a String which has a format as Json. If I want to separate values from the String. and exchange the values with '#number'. Currently, I don't know the keys. Is there any easy way to get this result?

for example,

from

{
"data": [
    {
        "skills": "Java",
        "platforms": "Web"
    }
],
"status": "100"
}

to

{
"data": [
    {
        "skills": #1,
        "platforms": #2
    }
],
"status": #3
}


with array result [Java, Web, 100]
Roy Kim
  • 561
  • 5
  • 9
  • Yes, parse the JSON and extract the needed values. – Seelenvirtuose Jul 18 '18 at 07:47
  • @Seelenvirtuose maybe I wasn't clear enough. I have updated the question. let's say I can change my string value(which has a format as Json) to a Json Object and extract the value(even if I don't know the keys) I can I extract the template itself with values exchanged with '#number' – Roy Kim Jul 18 '18 at 07:57

1 Answers1

0

Probably if you are looking to parse a unknown json and print the values Check this out

I wont be able to give you the exact code you need, but you should be able to implement on similar lines

  • Thank you for your comment. But I've looked at the solution. It helps me to get the keys and values. But still have no idea how to get the string itself with values change with '#number' – Roy Kim Jul 18 '18 at 08:41