- Issue created by @hga77
- Status changed to Closed: duplicate
over 1 year ago 5:42pm 15 September 2023 - 🇨🇦Canada joseph.olstad
There's been a patch available to fix this and it's been available since 2018 or so.
https://www.drupal.org/files/issues/2019-07-03/2988391-3-views_rest_supp... →
- 🇨🇦Canada joseph.olstad
see ✨ Add option to handle json wrapped in array Active
- 🇬🇧United Kingdom hga77
Thank you for the link @joseph.olstad. However this is not the solution for me since the object I am trying to map is wrapped in curley braces, not an array (as seen in my attached image).
- 🇨🇦Canada joseph.olstad
ok, yes you're correct, I think you just need to use the JSONPath mapping option and follow the documentation links for JSONPath syntax and limitation and look at the JSONPath examples.
I believe your use case is supported by external_entities. - Status changed to Active
over 1 year ago 4:54am 17 September 2023 - 🇬🇧United Kingdom hga77
Thanks @joseph.olstad. I think you might have missed the second image I attached where I show that I am using JSONPath. I also mentioned "Here's the mapping configs using JSONPath". You can see the syntax I'm using for attempting to map these properties. I also used an online JSONPath evaluator (https://jsonpath.com) to verify the mapping syntax.
For example, for mapping title I am using
$.data[*].title
which works on jsonpath.comPlease see image attached:
→ - 🇨🇦Canada joseph.olstad
I believe your syntax is incorrect, it should be this instead:
$.data[*][title]
- Status changed to Needs review
over 1 year ago 8:33pm 18 September 2023 - 🇨🇦Canada joseph.olstad
Any update? Did my suggestion help you find the correct mapping?
- Status changed to Fixed
11 months ago 12:23pm 16 February 2024 - 🇳🇱Netherlands pefferen
reading this I think the solution suggested in #13 should fix this issue.
Automatically closed - issue fixed for 2 weeks with no activity.