{"id":352,"date":"2018-02-05T11:38:55","date_gmt":"2018-02-05T03:38:55","guid":{"rendered":"https:\/\/blog.lcsoul.cn\/?p=352"},"modified":"2018-02-05T11:38:55","modified_gmt":"2018-02-05T03:38:55","slug":"%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%95%b0%e7%bb%84%e8%bd%ac%e6%8d%a2%e6%88%90%e6%95%b4%e5%9e%8b%e6%95%b0%e7%bb%84","status":"publish","type":"post","link":"https:\/\/blog.lcsoul.top\/index.php\/2018\/02\/05\/%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%95%b0%e7%bb%84%e8%bd%ac%e6%8d%a2%e6%88%90%e6%95%b4%e5%9e%8b%e6%95%b0%e7%bb%84\/","title":{"rendered":"\u5b57\u7b26\u4e32\u6570\u7ec4\u8f6c\u6362\u6210\u6574\u578b\u6570\u7ec4"},"content":{"rendered":"<p><!--more--><\/p>\n<pre class=\"prettyprint linenums\">var dataStr = \"1,2,3,4,5\"; \/\/\u539f\u59cb\u5b57\u7b26\u4e32\nvar dataStrArr = dataStr.split(\",\"); \/\/\u5206\u5272\u6210\u5b57\u7b26\u4e32\u6570\u7ec4\nvar dataIntArr = []; \/\/\u4fdd\u5b58\u8f6c\u6362\u540e\u7684\u6574\u578b\u5b57\u7b26\u4e32\n\/\/\u65b9\u6cd5\u4e00\ndataStrArr.forEach(function(data, index, arr) {\n    dataIntArr.push(+data);\n});\nconsole.log(dataIntArr);\n\/\/\u65b9\u6cd5\u4e8c\ndataIntArr = dataStrArr.map(function(data) {\n    return +data;\n});\nconsole.log(dataIntArr);\n<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[150,168,169],"class_list":["post-352","post","type-post","status-publish","format-standard","hentry","category-share","tag-150","tag-168","tag-169"],"_links":{"self":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":0,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}