迭代JSON属性列表 [英] Iterate through JSON property list

查看:164
本文介绍了迭代JSON属性列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里有JSON专家吗?我想知道是否有可能,如果是这样,迭代JSON属性列表,以便每次迭代选择每个对象的下一个值。下面是一个示例列表:

Any JSON experts out there? I''d like to know if it is possible, and if so how, to iterate through a JSON property list so that each iteration selects the next value for each object. Here is an example list:

展开 | 选择 | Wrap | 行号

推荐答案

hi ...


i希望我不要误解你的问题...看看下面的例子:

hi ...

i hope i don''t misunderstand your question ... have a look at the following example:

展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


嘿,gits!


好​​的,我想在这里理解你的代码。您是否记得几天前发布的帖子,您回复的那个帖子(dom属性与javascript属性)?

悬停脚本在FF& NN,但不是IE


嗯,createDOM是一个使用JSON属性列表中的值创建DOM元素(在本例中为元素)的函数;所以我的目标基本上是采取这样的几个属性列表:

Hey again, gits!

Ok, I am trying to understand your code here. Do you recall my post from a couple days ago, the one you replied to with that mass of code to go through (dom attributes vs. javascript attributes)?

Hover Scripts Work in FF & NN, but not IE

Well, createDOM is a function that creates a DOM element (or elements in this case) using the values from a JSON property list; so my goal is basically to take several property lists like this:

展开 | 选择 | Wrap | 行号


hi ...


让我们仔细看看我的例子并稍微调整一下以满足你的需求:

hi ...

lets have a closer look at my example and adapt it slightly to match your needs:

展开 | 选择 | Wrap | 行号


这篇关于迭代JSON属性列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆