I want to display the java list data in the html page. So i decided it is better to work with JSON. I converted the list into json string object. Using Jquery i can parse and display the info in the list. I converted the list into json object. It is converted as follows:
{"list":[{"one":"11","two":"21","three":31},{"one":"12","two":"22","three":32},{"one":"13","two":"23","three":33}]}
But I came to know that the syntax is little mismatched to parse by jQuery.
jQuery is handling the following one only as I came to know by googling:
'[{"one":"11","two":"21","three":31},{"one":"12","two":"22","three":32},{"one":"13","two":"23","three":33}]'
I just want to discard the substring occurrence of :
(colon) and last char {
also discards, Then I can pass this json
object and jQuery is handling well. I tried with the both strings, only second one works. How can I discard the substring with the first occurrence of :
with regex?