これは JS ファイル内のデータです。
[{\"value\":16633,\"name\":\"fdgdfgdf@joindiaspora.com\"},{\"value\":16910,\"name\":\"jamesw@wk3.org\"},{\"value\":16911,\"name\":\"sdasfasf@joindiaspora.com\"}]" ),
そして、次のような2次元配列で出力したい:
値の名前、
16633 fdgdfgdf@joindiaspora.com,
16910 jamesw@wk3.org,
16911 sdasfasf@joindiaspora.com
これまでの私のコードは次のとおりです。
$.ajax
({
async: false,
type: 'GET',
url: 'https://wk3.org/conversations/new',
success: function(data)
{
var matches;
var Ragex = /\\"value\\":\\"(.*)\\",\\"name\\":\\"(.*)\\"},/g //need to sort out the REGEX so it goes through each name and ID seeing if it equals ID
while ((matches = Ragex.exec(data)) !== null)
{
console.log(matches);
}
}
});
出力:
["\"value\":\"16633\",\"name\":\"fdgdfgdf@joindiaspora.com\"},…"},{\"value\":\"16910\",\"name\":\"jamesw@wk3.org\"},", "16633\",\"name\":\"fdgdfgdf@joindiaspora.com\"},{\"value\":\…"name\":\"sdasfasf@joindiaspora.com\"},{\"value\":\"16910", "jamesw@wk3.org", index: 92, input: "<script>↵ //<![CDATA[↵ $(document).ready(funct…it" value="Send" />↵</div>↵</form>↵</div>↵</div>↵"]