I am using the Craft Prune plugin (https://github.com/mattstauffer/craftcms-prune) to pull out a JSON array of entries from a section of my site with the aim of integrating the data into a typeahead search field as autocomplete data.
The problem I seem to be having is that the JSON array structure needs to be simplified for use as a datasource with typeahead.
So the current JSON data structure is:
[{"title":"Entry One Title"}, {"title":"Entry Two Title"}, {"title":"Entry Three Title"}]
What I actually need the structure to be is:
["Entry One Title", "Entry Two Title", "Entry Three Title"]
I have already tried using the jQuery $.each() function and the jQuery $.map() function but they both simply return an array of objects not a simple JS array.
Any help appreciated.