うまく質問のタイトルが書けませんでしたが、やりたいことは以下の通りです。
この配列であれば、id: "5"のfiled: "last_name_kana"を取得したいです。
何度も処理を行う可能性があるため、いい記述方法あればご教授ください。
[ { "id": "2", "field": "last_name", "msg": "名は必須項目です", "rule": "required", "scope": null }, { "id": "3", "field": "first_name_kana", "msg": "セイは必須項目です", "rule": "required", "scope": null }, { "id": "5", "field": "zip", "msg": "郵便番号は必須項目です", "rule": "required", "scope": null }, { "id": "4", "field": "last_name_kana", "msg": "メイは必須項目です", "rule": "required", "scope": null } ]
id = 5の要素の field は zip じゃないですか?
回答1件
あなたの回答
tips
プレビュー