Re: JSON results object
Kilian Evang <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 2014-01-29 18:24, [email protected] wrote: > I can successfully get the data, and convert it to the term, but > can't seem to figure out how to actually get to the values inside. > > What is the best/easiest way to get to the usable data once you have > the json(X) term? For example, my data looks like: > > json([size=1, limit=25, isLastPage= @(true), values=[json([... = > ...|...])], start=0, filter= @(null)]) > > Where do i go from here? > > I've tried converting it to key pairs, associated lists, asserting it > into the database and can't seem to figure out how to get to the > meaty goodness inside. It depends on what you want to do with it, but it sounds like json_convert might help you: http://www.swi-prolog.org/pldoc/doc_for?object=section%28%27sec:jsonconvert%27%29 Kilian