Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
SRP_JSON Keys
I have JSON from a provider endpoint I need to parse, however where you would normally use a product array, they have used keyed objects with an ID, example below, need to work out how to iterate over and get the list of products out without knowing the keys to the products first.
If I was doing it in JS, would use something like LoDash or Underscore to extract the keys but having just coded 90% of the parsing using the SRP method, would be good to keep this in the same format.
If I was doing it in JS, would use something like LoDash or Underscore to extract the keys but having just coded 90% of the parsing using the SRP method, would be good to keep this in the same format.
Have attempted to GET the products array into an handler then GETMEMBERS, but that just returns "???????????" so not sure what to do there...
{
"order_id": 12345,
"products": {
"34329439": {product_id: "1", "product": "some product"},
"39347847": {product_id: "2", "product": "some other product"}
}
}
Comments
You might just need an updated version of srp utilities because your issue sounds similar to this thread.
srp-hashtable-question-marks