How can I access a value from a Json file inside a matlab function?
Show older comments
Hi guys,
I am running R2013a with Jsonlab plugin, and here is my problem:
I am creating a function which retrieves the value attached to a key inside a Json file. The inputs to my function are the Json file and the key, and the output should be the value (with a specific formatting)
But here is the thing: I usually access the value by writing " filename.key ", but since here the key is input as a string in the function, the program behaves as if I was calling " filename.'key' " and returns me the following error "Reference to non-existent field 'key' "
Any idea on how to go around this issue?
1 Comment
simon poiret
on 3 Mar 2016
Answers (0)
Categories
Find more on JSON Format in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!