- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前在使用 React 解析一些 JSON 数据时遇到问题。这是我尝试使用的 JSON 数据:
[
{
"id": 3,
"car_brand_id": 2,
"car_model_id": 7,
"youtube": "",
"title": "New Ibiza range available in Sunderland & Durham - Pulman SEAT ",
"description": "Buy a new Ibiza from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "ibiza",
"published": 1,
"news": 0,
"published_at": "2016-07-05 09:16:04",
"created_at": "2016-05-23 12:45:20",
"updated_at": "2016-07-05 13:16:04",
"offers": [
{
"id": 9,
"car_page_id": 3,
"car_trim_id": 15,
"car_type_id": 1,
"cap_code_id": 0,
"car_image_id": 70,
"derivative": "SC 1.2 TSI 90PS ",
"car_position_id": 6,
"youtube_code": "XDKSBXbIXV0",
"terms": "This offer is for the from Pulman SEAT is based on PCP (personal contract plan). Valid for retail customers only. Vehicles to be registered and delivered before 30/09/16. Offer can be withdrawn at any time. It can also be extended. No other offers may be used in conjunction with the above detailed offer. At the beginning of the plan SEAT Financial services is the legal owner and provider of this PCP. At the end of the agreement there are 3 options: (i) Renew: Part exchange the vehicle (ii) Retain: Pay the Optional Final Payment to own the vehicle or (iii) Return the vehicle. *Payable with first payment. ** Payable with optional final payment. #4.4p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. † £2,500 deposit contribution available on Ibiza SC FR 1.2 TSI 90PS when purchased on SEAT Solutions. ^ £671 Saving based on RRP. Images for illustration purposes only. ^^ One year’s insurance included at no extra cost from SEAT Insurance is available on all qualifying new Ibiza FR models only ordered from 1st July 2016 to 30th September 2016 and registered by 10th January 2017 for drivers 18 and over. Drivers under 18 are not eligible. May exclude Northern Ireland. Drivers aged 18-24 are required to share their driving style data with a telematics product. Available on Ibiza FR trim only. Other eligibility criteria apply. Go to www.seat.co.uk/free-insurance-offer for full terms and conditions. This offer may be extended, changed or removed at any point. SEAT Motor Insurance from SEAT Financial Services is arranged and administered by Carrot Risk Technologies Limited.",
"status": 1,
"created_at": "2016-07-04 15:08:03",
"updated_at": "2016-07-19 14:03:46",
"image": {
"id": 70,
"car_image_category_id": 7,
"image_name": "Ibiza-FR-SC-Insurance",
"name": "aa093fb987a0898588daa8825f90001443afc68d.png",
"path": "img/imagedb/aa093fb987a0898588daa8825f90001443afc68d.png",
"thumbnail_path": "img/imagedb/thumbs/tn-aa093fb987a0898588daa8825f90001443afc68d.png",
"created_at": "2016-07-05 09:35:09",
"updated_at": "2016-07-05 09:35:09"
},
"trim": {
"id": 15,
"car_model_id": 7,
"name": "FR",
"created_at": "2016-06-08 10:07:45",
"updated_at": "2016-06-08 10:07:45"
}
}
],
"model": {
"id": 7,
"brand_id": 2,
"name": "Ibiza",
"created_at": "2016-05-23 12:44:29",
"updated_at": "2016-05-23 12:44:29"
}
},
{
"id": 6,
"car_brand_id": 2,
"car_model_id": 13,
"youtube": "",
"title": "New Mii range available in Sunderland & Durham - Pulman SEAT ",
"description": "Buy a new Mii from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "mii",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:51:57",
"created_at": "2016-06-08 10:57:52",
"updated_at": "2016-07-05 09:51:57",
"offers": [
{
"id": 6,
"car_page_id": 6,
"car_trim_id": 21,
"car_type_id": 1,
"cap_code_id": null,
"car_image_id": 60,
"derivative": "3DR 1.0 60PS",
"car_position_id": 2,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: I) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan ordered until 30th September 2016. *Payable with first payment. ** Payable with optional final payment. Retail sales only. #4.4p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. † £1,800 deposit contribution available on Mii Design 1.0 3DR when purchased on SEAT Solutions. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. **Pulman SEAT price match guarantee is available on like for like new SEAT models with identical spec. A genuine quote must be provided within a 15-mile radius. images for illustration purposes only",
"status": 1,
"created_at": "2016-06-15 08:41:56",
"updated_at": "2016-07-04 22:15:25",
"image": {
"id": 60,
"car_image_category_id": 11,
"image_name": "Mii-Design",
"name": "dbecbdbc29234053e0bf8a09968ad991e7a17492.png",
"path": "img/imagedb/dbecbdbc29234053e0bf8a09968ad991e7a17492.png",
"thumbnail_path": "img/imagedb/thumbs/tn-dbecbdbc29234053e0bf8a09968ad991e7a17492.png",
"created_at": "2016-07-04 12:34:07",
"updated_at": "2016-07-04 12:34:07"
},
"trim": {
"id": 21,
"car_model_id": 13,
"name": "Design",
"created_at": "2016-06-14 09:17:10",
"updated_at": "2016-06-14 09:17:10"
}
}
],
"model": {
"id": 13,
"brand_id": 2,
"name": "Mii",
"created_at": "2016-06-08 10:54:21",
"updated_at": "2016-06-08 10:54:21"
}
},
{
"id": 8,
"car_brand_id": 2,
"car_model_id": 11,
"youtube": "",
"title": "New SEAT Leon range available in Sunderland & Durham - Pulman SEAT ",
"description": "Buy a new SEAT Leon from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "leon",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:53:33",
"created_at": "2016-07-04 08:38:32",
"updated_at": "2016-07-05 09:53:33",
"offers": [
{
"id": 21,
"car_page_id": 8,
"car_trim_id": 35,
"car_type_id": 1,
"cap_code_id": null,
"car_image_id": 50,
"derivative": "5DR 1.2 TSI 110PS",
"car_position_id": 19,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: i) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan until 30th September 2016. Retail sales only. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £2,000 deposit contributions available when purchased on SEAT Personal Contract Plan. Retail Sales Only. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. Images for illustrative purposes only. ",
"status": 1,
"created_at": "2016-07-05 08:29:28",
"updated_at": "2016-07-19 14:03:46",
"image": {
"id": 50,
"car_image_category_id": 12,
"image_name": "Leon-SE-5DR",
"name": "184484219879badbb5dab51b7421203c2bc16fa0.png",
"path": "img/imagedb/184484219879badbb5dab51b7421203c2bc16fa0.png",
"thumbnail_path": "img/imagedb/thumbs/tn-184484219879badbb5dab51b7421203c2bc16fa0.png",
"created_at": "2016-07-04 12:25:48",
"updated_at": "2016-07-04 12:25:48"
},
"trim": {
"id": 35,
"car_model_id": 11,
"name": "SE Dynamic",
"created_at": "2016-06-14 09:51:20",
"updated_at": "2016-06-14 09:51:20"
}
}
],
"model": {
"id": 11,
"brand_id": 2,
"name": "Leon",
"created_at": "2016-06-08 10:06:29",
"updated_at": "2016-06-08 10:06:29"
}
},
{
"id": 9,
"car_brand_id": 2,
"car_model_id": 14,
"youtube": "",
"title": "Lorem",
"description": "Lorem",
"slug": "ibiza-st",
"published": 0,
"news": 0,
"published_at": "2016-07-04 11:38:48",
"created_at": "2016-07-04 13:05:29",
"updated_at": "2016-07-04 15:38:48",
"offers": [],
"model": {
"id": 14,
"brand_id": 2,
"name": "Ibiza ST",
"created_at": "2016-06-08 10:54:53",
"updated_at": "2016-06-08 10:54:53"
}
},
{
"id": 10,
"car_brand_id": 2,
"car_model_id": 15,
"youtube": "",
"title": "New Leon ST range available in Sunderland & Durham - Pulman SEAT ",
"description": "Buy a new SEAT Leon ST from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "leon-st",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:54:09",
"created_at": "2016-07-04 13:23:23",
"updated_at": "2016-07-05 09:54:09",
"offers": [
{
"id": 22,
"car_page_id": 10,
"car_trim_id": 48,
"car_type_id": 1,
"cap_code_id": null,
"car_image_id": 53,
"derivative": "5DR 1.2 TSI 110PS",
"car_position_id": 23,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: i) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan until 30th September 2016. Retail sales only. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £2,000 deposit contributions available when purchased on SEAT Personal Contract Plan. Retail Sales Only. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. Images for illustrative purposes only.",
"status": 1,
"created_at": "2016-07-05 08:38:51",
"updated_at": "2016-07-19 14:15:41",
"image": {
"id": 53,
"car_image_category_id": 12,
"image_name": "Leon-ST-SE",
"name": "c743dc09fc1b24c1fac866baf6e3fe3f98f3e6af.png",
"path": "img/imagedb/c743dc09fc1b24c1fac866baf6e3fe3f98f3e6af.png",
"thumbnail_path": "img/imagedb/thumbs/tn-c743dc09fc1b24c1fac866baf6e3fe3f98f3e6af.png",
"created_at": "2016-07-04 12:25:49",
"updated_at": "2016-07-04 12:25:49"
},
"trim": {
"id": 48,
"car_model_id": 15,
"name": "SE Dynamic",
"created_at": "2016-06-14 10:39:16",
"updated_at": "2016-06-14 10:39:16"
}
}
],
"model": {
"id": 15,
"brand_id": 2,
"name": "Leon ST",
"created_at": "2016-06-08 10:55:21",
"updated_at": "2016-06-08 10:55:21"
}
},
{
"id": 11,
"car_brand_id": 2,
"car_model_id": 16,
"youtube": "",
"title": " New SEAT Leon Cupra range available in Sunderland - Pulman SEAT ",
"description": "Buy a new SEAT Leon Cupra from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "leon-cupra",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:55:06",
"created_at": "2016-07-04 13:27:04",
"updated_at": "2016-07-05 09:55:06",
"offers": [
{
"id": 11,
"car_page_id": 11,
"car_trim_id": 39,
"car_type_id": 1,
"cap_code_id": null,
"car_image_id": 67,
"derivative": "SC 2.0 TSI 290PS ",
"car_position_id": 11,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: I) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan on vehicles ordered until 30th September 2016. Retail sales only. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £2,500 deposit contribution available when purchased with SEAT finance. * Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. Images for illustrative purposes only. Images for illustration purposes only.",
"status": 1,
"created_at": "2016-07-04 15:39:03",
"updated_at": "2016-07-19 14:03:46",
"image": {
"id": 67,
"car_image_category_id": 16,
"image_name": "Leon-Cupra",
"name": "860d4b8e32224ccabe5cf4c2b78424b0fccbf0ea.png",
"path": "img/imagedb/860d4b8e32224ccabe5cf4c2b78424b0fccbf0ea.png",
"thumbnail_path": "img/imagedb/thumbs/tn-860d4b8e32224ccabe5cf4c2b78424b0fccbf0ea.png",
"created_at": "2016-07-05 09:22:40",
"updated_at": "2016-07-05 09:22:40"
},
"trim": {
"id": 39,
"car_model_id": 16,
"name": "290",
"created_at": "2016-06-14 10:16:19",
"updated_at": "2016-06-14 10:16:19"
}
}
],
"model": {
"id": 16,
"brand_id": 2,
"name": "Leon Cupra",
"created_at": "2016-06-08 10:55:28",
"updated_at": "2016-06-08 10:55:28"
}
},
{
"id": 12,
"car_brand_id": 2,
"car_model_id": 17,
"youtube": "",
"title": " New SEAT Leon X-PERIENCE range available in Sunderland - Pulman SEAT ",
"description": "Buy a new SEAT Leon X-PERIENCE from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "leon-x-perience",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:56:46",
"created_at": "2016-07-04 13:40:32",
"updated_at": "2016-07-05 09:56:46",
"offers": [
{
"id": 23,
"car_page_id": 12,
"car_trim_id": 37,
"car_type_id": 1,
"cap_code_id": 175,
"car_image_id": 54,
"derivative": "2.0 TDI 150PS",
"car_position_id": 24,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: i) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan until 30th September 2016. Retail sales only. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £2,000 deposit contributions available when purchased on SEAT Personal Contract Plan. Retail Sales Only. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. Images for illustrative purposes only. ^^ This information should be used for illustration purposes only. Standard EU Test figures for comparison purposes, may not reflect real driving results.",
"status": 1,
"created_at": "2016-07-05 09:43:11",
"updated_at": "2016-07-19 14:15:41",
"image": {
"id": 54,
"car_image_category_id": 12,
"image_name": "Leon-X-Perience",
"name": "e3e791f870ef57ade77d1f04436d423ac9ae5755.png",
"path": "img/imagedb/e3e791f870ef57ade77d1f04436d423ac9ae5755.png",
"thumbnail_path": "img/imagedb/thumbs/tn-e3e791f870ef57ade77d1f04436d423ac9ae5755.png",
"created_at": "2016-07-04 12:25:50",
"updated_at": "2016-07-04 12:25:50"
},
"trim": {
"id": 37,
"car_model_id": 17,
"name": "SE",
"created_at": "2016-06-14 10:11:43",
"updated_at": "2016-06-14 10:11:43"
}
}
],
"model": {
"id": 17,
"brand_id": 2,
"name": "Leon X-PERIENCE",
"created_at": "2016-06-08 10:55:54",
"updated_at": "2016-06-08 10:55:54"
}
},
{
"id": 13,
"car_brand_id": 2,
"car_model_id": 18,
"youtube": "",
"title": "New SEAT Toledo range available in Sunderland - Pulman SEAT ",
"description": "Buy a new SEAT Toledo from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "toledo",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:56:34",
"created_at": "2016-07-04 13:40:48",
"updated_at": "2016-07-05 09:56:34",
"offers": [
{
"id": 19,
"car_page_id": 13,
"car_trim_id": 50,
"car_type_id": 1,
"cap_code_id": 197,
"car_image_id": 63,
"derivative": "1.4 TDI Ecomotive SE",
"car_position_id": 18,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: I) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan on vehicles ordered until 30th September 2016. Retail sales only. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £3,250 deposit contribution available on when purchased on SEAT Solutions. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. Images for illustrative purposes only. ^^ This information should be used for illustration purposes only. Standard EU Test figures for comparison purposes, may not reflect real driving results.",
"status": 1,
"created_at": "2016-07-05 08:17:55",
"updated_at": "2016-07-19 14:03:46",
"image": {
"id": 63,
"car_image_category_id": 14,
"image_name": "Toledo-Style-Advanced",
"name": "f2ba78e24b7f9286e5c4b37da716e491a99f2d23.png",
"path": "img/imagedb/f2ba78e24b7f9286e5c4b37da716e491a99f2d23.png",
"thumbnail_path": "img/imagedb/thumbs/tn-f2ba78e24b7f9286e5c4b37da716e491a99f2d23.png",
"created_at": "2016-07-04 12:41:54",
"updated_at": "2016-07-04 12:41:54"
},
"trim": {
"id": 50,
"car_model_id": 18,
"name": "SE",
"created_at": "2016-06-14 10:49:09",
"updated_at": "2016-06-14 10:49:09"
}
}
],
"model": {
"id": 18,
"brand_id": 2,
"name": "Toledo",
"created_at": "2016-06-08 10:56:11",
"updated_at": "2016-06-08 10:56:11"
}
},
{
"id": 14,
"car_brand_id": 2,
"car_model_id": 19,
"youtube": "",
"title": "New SEAT Alhambra range available in Sunderland - Pulman SEAT ",
"description": "Buy a new SEAT Alhambra from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "alhambra",
"published": 1,
"news": 0,
"published_at": "2016-07-05 05:57:49",
"created_at": "2016-07-04 13:41:03",
"updated_at": "2016-07-05 09:57:49",
"offers": [
{
"id": 15,
"car_page_id": 14,
"car_trim_id": 54,
"car_type_id": 1,
"cap_code_id": 3,
"car_image_id": 64,
"derivative": "2.0 TDI CR 150PS ",
"car_position_id": 14,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: I) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan. Retail sales only. Offer available for vehicles ordered before 30th September 2016. *Payable with first payment. ** Payable with optional final payment. #7.2p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Certain vehicles excluded- ask for full details. † £2,000 deposit contribution available on SEAT Alhambra when purchased on SEAT Solutions. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. ^^ This information should be used for illustration purposes only. Standard EU Test figures for comparison purposes, may not reflect real driving results. Images for illustrative purposes only.",
"status": 1,
"created_at": "2016-07-04 15:55:00",
"updated_at": "2016-07-19 14:03:46",
"image": {
"id": 64,
"car_image_category_id": 15,
"image_name": "Alhambra",
"name": "d6a0039805cdb91732992799ef0d52892767a36b.png",
"path": "img/imagedb/d6a0039805cdb91732992799ef0d52892767a36b.png",
"thumbnail_path": "img/imagedb/thumbs/tn-d6a0039805cdb91732992799ef0d52892767a36b.png",
"created_at": "2016-07-04 12:44:19",
"updated_at": "2016-07-04 12:44:19"
},
"trim": {
"id": 54,
"car_model_id": 19,
"name": "SE",
"created_at": "2016-06-14 10:55:55",
"updated_at": "2016-06-14 10:55:55"
}
}
],
"model": {
"id": 19,
"brand_id": 2,
"name": "Alhambra",
"created_at": "2016-06-08 10:56:23",
"updated_at": "2016-06-08 10:56:23"
}
},
{
"id": 15,
"car_brand_id": 2,
"car_model_id": 20,
"youtube": "mJTPmbuxwqQ",
"title": "New ATECA range available in Sunderland & Durham - Pulman SEAT ",
"description": "Buy a new SEAT ATECA from Pulman SEAT - Available to test drive in Sunderland & Durham",
"slug": "ateca",
"published": 1,
"news": 0,
"published_at": "2016-07-07 08:22:04",
"created_at": "2016-07-07 09:16:52",
"updated_at": "2016-07-07 12:22:04",
"offers": [
{
"id": 26,
"car_page_id": 15,
"car_trim_id": 62,
"car_type_id": 1,
"cap_code_id": null,
"car_image_id": 80,
"derivative": "1.0 TSI 115PS",
"car_position_id": 25,
"youtube_code": "",
"terms": "At the end of the agreement there are three options: I) retain the vehicle: pay the optional final payment to own the vehicle; ii) return the vehicle; or iii) replace: part exchange the vehicle, subject to status. Available when purchased on Solutions Personal Contract Plan ordered until 30th September 2016. *Payable with first payment. ** Payable with optional final payment. Retail sales only. #4.4p per mile excess mileage charges apply. Further charges may be payable if vehicle is returned. Indemnities may be required. Subject to status. Available to over 18s in the UK only. Offer is subject to vehicle availability and may be varied or withdrawn at any time. Finance providers may pay us for introducing you to them. We can introduce you to a limited number of lenders to assist with your purchase, who may pay us for introducing you to them. ",
"status": 1,
"created_at": "2016-07-07 12:13:50",
"updated_at": "2016-07-19 14:15:41",
"image": {
"id": 80,
"car_image_category_id": 17,
"image_name": "Ateca-First",
"name": "df14d12b1016b885cf63a47900886322d1c189f9.png",
"path": "img/imagedb/df14d12b1016b885cf63a47900886322d1c189f9.png",
"thumbnail_path": "img/imagedb/thumbs/tn-df14d12b1016b885cf63a47900886322d1c189f9.png",
"created_at": "2016-07-07 09:44:21",
"updated_at": "2016-07-07 09:44:21"
},
"trim": {
"id": 62,
"car_model_id": 20,
"name": "First Edition",
"created_at": "2016-07-07 09:06:31",
"updated_at": "2016-07-07 09:06:31"
}
}
],
"model": {
"id": 20,
"brand_id": 2,
"name": "Ateca",
"created_at": "2016-07-07 09:04:36",
"updated_at": "2016-07-07 09:04:36"
}
}
]
我可以使用大部分数据,但是当我尝试访问 "offers"
数组中的对象时,它不会提取任何数据。
目前我可以像这样将数据拉入我的组件:
{props.vehicle.model.name}
但是,如果我尝试像这样从数组中提取数据:
{props.vehicle.offers.derivative}
没有数据被拉到前端,知道如何访问该数据吗?
谢谢,尼克
最佳答案
offers
是 Objects
的 Array
,首先你需要通过索引获取 Array
元素,然后获取 对象的
属性
props.vehicle.offers[0].derivative
更新
你得到这个错误(TypeError: Cannot read property 'derivative' of undefined
)因为你有 offers
为空的数据 Array
,例如 { id: 9 }
,offers
为空。如果 offers
为空 Array
offers[0]
返回 undefined
,当您尝试获取属性 .derivative
时它会抛出错误,因为 undefined
没有任何属性。,您可以添加条件来检查 offers
是否包含元素 - Example
关于javascript - 在 ReactJS 中访问数组中的对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38524580/
我需要将文本放在 中在一个 Div 中,在另一个 Div 中,在另一个 Div 中。所以这是它的样子: #document Change PIN
奇怪的事情发生了。 我有一个基本的 html 代码。 html,头部, body 。(因为我收到了一些反对票,这里是完整的代码) 这是我的CSS: html { backgroun
我正在尝试将 Assets 中的一组图像加载到 UICollectionview 中存在的 ImageView 中,但每当我运行应用程序时它都会显示错误。而且也没有显示图像。 我在ViewDidLoa
我需要根据带参数的 perl 脚本的输出更改一些环境变量。在 tcsh 中,我可以使用别名命令来评估 perl 脚本的输出。 tcsh: alias setsdk 'eval `/localhome/
我使用 Windows 身份验证创建了一个新的 Blazor(服务器端)应用程序,并使用 IIS Express 运行它。它将显示一条消息“Hello Domain\User!”来自右上方的以下 Ra
这是我的方法 void login(Event event);我想知道 Kotlin 中应该如何 最佳答案 在 Kotlin 中通配符运算符是 * 。它指示编译器它是未知的,但一旦知道,就不会有其他类
看下面的代码 for story in book if story.title.length < 140 - var story
我正在尝试用 C 语言学习字符串处理。我写了一个程序,它存储了一些音乐轨道,并帮助用户检查他/她想到的歌曲是否存在于存储的轨道中。这是通过要求用户输入一串字符来完成的。然后程序使用 strstr()
我正在学习 sscanf 并遇到如下格式字符串: sscanf("%[^:]:%[^*=]%*[*=]%n",a,b,&c); 我理解 %[^:] 部分意味着扫描直到遇到 ':' 并将其分配给 a。:
def char_check(x,y): if (str(x) in y or x.find(y) > -1) or (str(y) in x or y.find(x) > -1):
我有一种情况,我想将文本文件中的现有行包含到一个新 block 中。 line 1 line 2 line in block line 3 line 4 应该变成 line 1 line 2 line
我有一个新项目,我正在尝试设置 Django 调试工具栏。首先,我尝试了快速设置,它只涉及将 'debug_toolbar' 添加到我的已安装应用程序列表中。有了这个,当我转到我的根 URL 时,调试
在 Matlab 中,如果我有一个函数 f,例如签名是 f(a,b,c),我可以创建一个只有一个变量 b 的函数,它将使用固定的 a=a1 和 c=c1 调用 f: g = @(b) f(a1, b,
我不明白为什么 ForEach 中的元素之间有多余的垂直间距在 VStack 里面在 ScrollView 里面使用 GeometryReader 时渲染自定义水平分隔线。 Scrol
我想知道,是否有关于何时使用 session 和 cookie 的指南或最佳实践? 什么应该和什么不应该存储在其中?谢谢! 最佳答案 这些文档很好地了解了 session cookie 的安全问题以及
我在 scipy/numpy 中有一个 Nx3 矩阵,我想用它制作一个 3 维条形图,其中 X 轴和 Y 轴由矩阵的第一列和第二列的值、高度确定每个条形的 是矩阵中的第三列,条形的数量由 N 确定。
假设我用两种不同的方式初始化信号量 sem_init(&randomsem,0,1) sem_init(&randomsem,0,0) 现在, sem_wait(&randomsem) 在这两种情况下
我怀疑该值如何存储在“WORD”中,因为 PStr 包含实际输出。? 既然Pstr中存储的是小写到大写的字母,那么在printf中如何将其给出为“WORD”。有人可以吗?解释一下? #include
我有一个 3x3 数组: var my_array = [[0,1,2], [3,4,5], [6,7,8]]; 并想获得它的第一个 2
我意识到您可以使用如下方式轻松检查焦点: var hasFocus = true; $(window).blur(function(){ hasFocus = false; }); $(win
我是一名优秀的程序员,十分优秀!