I have a complex JSON like this:
{
"a": {
"b": {
"c": {
"price": {
"type": "coin",
"value": "currency"
}
}
}
},
"e": {
"f": {
"price": {
"type": "note",
"value": "currency"
}
}
},
"price": {
"type": "cents",
"value": "dollars"
}
}
I am trying to write a JavaScript function that will find "price" at any location and pull out the "type" and "value" for it. So my output should be:
"coin" : "currency"
"note" : "currency"
"cents" : "dollars"