Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert an array string to VFP cursor/array
Message
From
07/01/2017 08:29:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646369
Message ID:
01646384
Views:
127
It might help if you start by converting this into an array. I.e.:
* Remove the braces
* Use alines() to convert to an array (using the ":" as a separator)
* Then you can parse each individual array element. For example, the first element will contain the text:
"Version":"2.2222"

>Hi,
>
>In one place of my app, the response of the Web API call is an "array" (I put the array in quotation marks because this is not exactly a VFP array). The "array" string looks like this:
>
>{"Version":"2.2222","Connected":true}
>
>
>I suppose I can parse this string to get the values. But I was wondering if there is a "better" way to convert this string to an array or a cursor?
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform