Hi, I am trying to find this string "QuickSearchResultsCOnfig" in a text file. The text file will contain this in several places. I need the following
var QuickSearchResultsConfig = ['a','b','v','d','e
'f','f'];
I need to replace the above with
var QuickSearchResultsConfig = [['a',{hidden:true}],['b', {hidden:true}],'v','d','e
'f','g '];
My original approach:
Store a,b,c,d,e,f,g in a list []
Read file line by line
For every line
if line contains "QuickSearchResultsConfig"
then for every item in list[]
replace item by '['+item+',hidden:true}],
This doestn work
Any simple efficient ways of doing this?