0

I have a JSON file, and I need to convert some of the entries into anchor tags. I think a regular expression is the way to go, but I'm terrible with them.

I need to convert:

"id":"1","template_name",

into:

"<a href='getTemplate?1'>template_name</a>",

The text "id" is hard-coded, present in every instance where I need this conversion to happen. The "1" and the "template_name" are variable, changing record by record.

2
Contributors
1
Reply
8
Views
2 Months
Discussion Span
Last Post by rproffitt
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.