I have hundreds of html files that contain a JavaScript containing a manifest array like this:
var manifest = [{
src: "audio1.mp3", //might have different name and path per file
id: "audio1" //might have different name and path per file
},
{
src: "audio2.mp3",
id: "audio2"
},
{
//etc...
}]
I want to add a new key-value pair (exaclty the same in each case) to each object in each HTML page's manifest array so that it looks like
var manifest = [{
src: "audio1.mp3",
id: "audio1",
sameKey : "sameValue"
},
{
src: "audio2.mp3",
id: "audio2",
sameKey : "sameValue"
},
{
//etc...
}]
Any tools or tricks to do this in one batch? Thanks in advance.