I have a massive string, divided into two parts that follow this pattern:
{\"Query\":\"blabla"\",\"Subject\":\"gagaga"}",
{\"Query\":\"lalala"\",\"Subject\":\"rarara\"}",
and so on... (thousands of lines)
My goal is to create a variable that contains these values:
data= "blabla,gagaga","lalala,rarara",....
This is the code I'm using but it's not functioning correctly:
var contentss = JSON.stringify(allFileGenesDetails1);
data="";
var Query1="";
var Subject1="";
// Parse the data
var contentEachLines = contentss.split("\n");
for (var jj = 0; jj < contentEachLines.length; jj++) {
var lineContent = contentEachLines[jj].split("\t");
var divided = lineContent[jj].split(",");
Query1= Query1+ [divided[0]];
Query1 = Query1.replace(/Query|:|{|"|\|/gi, "");
Subject1=Subject1+ divided[1];
Subject1 = Subject1.replace(/Subject|:|{|"|\|/gi, "");
data=data+"'"+ Query1+","+Subject1 +" ' " +"," ;