Is there a module available that can decode form data to JSON format and send it to an API?
If not, do I need to make a module myself? Which functions should I use then?

What I've tried so far is to get the JSON data with the Feeds module and put it in a Drupal node field.
I want to use the data of the field in a Webform form and then send it back to the API.

Is this possible?
Hopefully someone can point me to the right direction - Thanks!

Comments

WorldFallz’s picture

Take a step back for a second-- if you already have the data in nodes via feeds, why push to a webform as well? What is the underlying use case for what you're trying to do?

atiba’s picture

Thank you for your reply!

Well, I just want to use the data that's available on the API. This data needs to load in a form so a user can alter the info and send it back to the server. For example: Load a bunch of available dates in a dropdown field, so a user can choose his/her preferred day for an appointment and send it to server to reserve that date.

The thing is, the API stores this JSON data in a XML element called <content>.
So my plan was to pull the JSON data out of the XML file with the Feeds module to a Drupal node field so it's easier to work with in Drupal.

I'm not sure my approach makes sense, any advice is welcome and highly appreciated.