I re-populate form with JSON data via javascript (all data has the same origin server) 1 Wen the page load, make a request post ajax 2 The response Ajax is a: Object { primary_ns: {…}, secondary_ns: {…} } Here is where I do the re-populate form, looping over Object. What do you think about this related to user experience or related to code maintenance or security ?
It should be fine assuming you have control over the originating json - use jest or a testing tool to create automated tests you can run each week to check that everything still works. I have a monster form that my users fill in and can come back to edit, print etc and it's all loaded via that kind of mechanism.