I would like to import content with feeds module with JSONPath extensible parser and create nodes of them.
When I have a hierachical JSON with a parent, the mapping is working like a charme (e.g. context: $.article.* / source: $..title).
My problem occures, when the JSON contains a single content (that should be imported to a single node) and all relevant elements are on the first/root level. This guy had a similar problem, although in my case I even do only have one content per JSON doc (Link), but with the suggested solutions I do not get it work.
{
"identifier": "test0004",
"title": "This is a title",
"application": "Drupal",
}
I don't have any clue, what context and what source I have to define, to make it work. As context I desperately tried-I believe-everything, amongst others:
- .
- .*
- $
- $.*
- $[]
And as source $.title, $title, title etc.
What I am doing wrong?
.
works as context in this case. Tested on jsonpath.curiousconcept.com/#jsonpath. Do note that your JSON example has an error: the comma after the last item should be removed.