My JSON structure is as follows
var data = [
{name:'bracket', start_45641654:'46513489431',end_26441:'75434'},
{ name: 'notation', end_746413: '2146464', start_51345641: '76542464' },
];
I want to print start, end object values, Here a random number is appending to keys start_
and end_
. Tried to use ^
regular expression pattern but it is not working. Is there any other way to print the values?
data.forEach(function (v, i) {
$('tr').prepend('<td>Name:' + v['name'] + '</td>' +
'<td>Start:' + v['^start_'] + '</td>' +
'<td>End:' + v['^end_'] + '</td>'
);
});