使用github端點(diǎn)https://api.github.com/users/,我想將json響應(yīng)復(fù)制到具有相同鍵的javascript對(duì)象中,有沒(méi)有比逐行使用oject變量賦值更好的方法? ?示例 json 響應(yīng){ "login": "imukunya", "name": null, "company": null, "blog": "", "location": null, "email": null, "hireable": null, "bio": null, "twitter_username": null, "public_repos": 19, "public_gists": 0, "followers": 0, "following": 0, "created_at": "2020-04-28T07:14:15Z", "updated_at": "2020-11-06T04:20:24Z"}JavaScript 對(duì)象userProfile = { "login": "", "name": , "company": , "blog": "", "location":"" , "email": "", "hireable": "", "bio": "", "twitter_username": "", "public_repos": 0, "public_gists": 0, "followers": 0, "following": 0, "created_at": "", "updated_at": ""}
Github API 響應(yīng)復(fù)制到 javascript 對(duì)象 Angular 應(yīng)用程序
青春有我
2023-07-14 09:58:46