CSV file to JSON with HTML
Hi,
What approach should we take to fulfill the requirement of extracting data from CSV file, displaying row data on HTML page and converting CSV data into JSON to publish it to external systems?
Thanks,
Hi,
What approach should we take to fulfill the requirement of extracting data from CSV file, displaying row data on HTML page and converting CSV data into JSON to publish it to external systems?
Thanks,
Basically you can use sling model to write your backend code to read the csv data and expose it on the HTML as we use it normally. On the same sling model you can you use sling model exporter as well using https://medium.com/@toimrank/aem-sling-model-exporter-90dc872835b9. by default you access the json with the component path on the page using page-component.model.json and if you want to access only with pagename.model.json then you can write a sling servlet that will get bind at template level and from where you can call your sling model.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.