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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.