使用github端點https://api.github.com/users/,我想將json響應復制到具有相同鍵的javascript對象中,有沒有比逐行使用oject變量賦值更好的方法? ?示例 json 響應{ "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 對象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 響應復制到 javascript 對象 Angular 應用程序
青春有我
2023-07-14 09:58:46