Jump to content
  • 0

Проблема с JSON


Беркут
 Share

Question

Привет!

Возникла проблема с JSON

Есть массив:

{"pk": 2517455, "model": "yahoodata.wheel", 
"fields": {"text": " экспресс-почта Сагава ",
"brand_disk": "", "loaded": null, "seller":
"minime10ru", "section": 48, "annotation": "7 дней",
"note": "10/05/2010 19:41", "state": "used", "name_tr": "",
"tyre": "", "withrub": 1, "price_limit": 0, "leader": null,
"status": "active", "updated": "2010-05-03 19:59:11", "hotlot": 0,
"lot": "", "ends_date": "2010-05-10 19:41:37", "textsearch": "",
"price_start": 89000, "line": null, "slug": "", "text_tr": "",
"b": "6.5", "name": " новая модель ... оригинальные диски 215/60R17 зимние шины Lagreat CRV",
"price_step": false, "created": "2010-04-19 17:00:02", "price_current": 89000, "bids": "0",
"disksnum": "4", "maker": null, "s": "5x114.3", "r": "17", "image_url": "", "v": "55",
"price_blitz": 95000}}, {"pk": 2, "model": "transport.tarif", "fields": {"status": "disabled",
"city": 1199, "homesum": 500.0, "sum": 9.3900000000000006, "minsum": 300.0, "transport": 1}}

этот массив прогоняю через

var arr=eval('('+json+')')[0];

но не могу понять почему при вызове alert (arr["fields"]["price_current"]); выдает ошибку что "fields" не является объектом...

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy