I want to read json data from external url and display those data in a node. After that I would like to add filters in the result using views. I have created a view using external url(query settings) and display result in a block.. But I cant add filters for that. How to add Filters for that data.. I am new to this.. Please help me..
2 Answers
If the data does not have to be live and can be fetched / updated every x number of minutes, then I suggest you create a task with scheduler which loads the remote data into a local database table at a specified interval (drupal_json_decode
can help converting the JSON string into an array that can be inserted in the database). After you do that you would be able to adopt that table into Drupal & Views using the Data module. This would make the data available as a view with sort handlers and filters, like any other view. Otherwise, to handle live data I would suggest integrating Angular JS to retrieve the remote JSON and to filter the results. NgApp module can help you in this regard.