Ron*_*rio 2 javascript arrays jquery local-storage
我在脚本上有结果数组,如下所示:
var myurlsave = [{"url_field":"yahoo","enabled":true},{"url_field":"google","enabled":true},{"url_field":"bing","enabled":true}];
Run Code Online (Sandbox Code Playgroud)
我想将它提取为如下所示:
var myurlname = ["yahoo", "google", "bing"];
Run Code Online (Sandbox Code Playgroud)
我认为这对你来说很容易,但我很难做到这一点.谢谢您的帮助
var arr = myurlsave.map(function(a) {
return a.url_field;
});
Run Code Online (Sandbox Code Playgroud)