Json解析取得key
2821 ワード
var
obj
=
{
"id"
:
1
,
"name"
:
" "
};
for
(
var
key
in
obj
)
{
console
.
log
(
"Key :"
+
key
);
console
.
log
(
" :"
+
obj
[
key
]);
}