简体   繁体   中英

How to parse it using jquery ajax form values

How to parse form values and want to validate 15 object has values are not it is exist or not. I have tried it using jQuery.parseJSON() but it is not working.

    [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object,Object, Object, Object, Object, Object, Object, Object…]
[0 … 99]
0: Object
1: Object
name: "form_token"
value: "ZEQq-70EBd5vy82OECyLjun4evRCnw6cdlRepv8mhbY"
__proto__: Object
2: Object
3: Object
4: Object
name: "video[field_phone]"
value: ""
__proto__: Object
5: Object
name: "video[field_phone_ext]"
value: ""
__proto__: Object
6: Object
7: Object
8: Object
9: Object
10: Object
11: Object
12: Object
13: Object
14: Object
15: Object
name: "files[video_field_photo]"
value: ""
__proto__: Object

thanks

If Values is your json array. Then you can access the 15th item of your object and check for its value using

Values[14].value

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM