I'm trying to see if there is a way for me to parse a json object that has a space in it. Below is a sample of what the json looks like:
[
{"Search Engine":"Google","Keywords":"air conditioning Altamonte Springs FL"},
{"Search Engine":"Google","Keywords":"air conditioning Apopka FL"}
]
Below is the JavaScript I'm using to parse the data
jQuery.ajax({
url: '<?php echo plugins_url('CSAnalytics/csv-json/csv-converter.php'); ?>',
dataType: 'json',
success: function (response) {
var searchHTML = '';
jQuery.each(response, function (i, item) {
searchHTML += '<tr><td class="tg-yw4l">' + item.Search Engine + '</td><td class="tg-yw4l">' + item.Keywords + '</td><td class="tg-yw4l">' + item.Website + '</td><td class="tg-yw4l">' + item.Position + '</td><td class="tg-yw4l">' + item.Previous + '</td><td class="tg-yw4l">' + item.Change + '</td><td class="tg-yw4l">' + item.Page + '</td><td class="tg-yw4l">' + item.Best + '</td></tr>';
});
jQuery('#search_ranking').append(searchHTML);
}
});
I cannot figure out how to parse the data out for "Search Engine" because it has that space in it.