I am taking CSV data, displaying it to the user with input fields. I am looking to take these values update the Json and converted to XML. Is it possible to update Json with user inputs or is there a different way to do this?
$(document).ready(function() {
$.getJSON(
'CSV.php',
function(data) {
$.each(data, function(index, element) {
newDiv = $('<div/>').addClass('row').appendTo('#showdata');
$('<div class="options">Payment Format: <select name="Payment_Format"><option value="CCC" selected="selected">Company to Company</option><option value="PPP">Company to Person</option></select> </div>').appendTo(newDiv);
$('<div class="field">' + value + '</div>').appendTo(newDiv);
}
}
You will pretty much need to follow this flow:
obj.name = user_input)I’m not going to force you to use JSON entirely but I will ask you to consider it if you can. It plays much nicer with JS and there are tons of libraries out there for other languages. Not to mention it uses significantly less data than XML. If your hands are tied on this though, this is the approach to take