I wonder how it’s possible to get a value out of a nested JSON Array.
On first level, it’s actually working like this for me:
name := ((JSONValue as TJSONArray).Items[i] as TJSonObject).Get('meta_data').JSONValue.Value;
I tried different versions of .Get
like:
.Get('meta_data.94.key').JSONValue.Value
or
.Get(['meta_data'],['94'],['key']).JSONValue.Value
I have no idea how it should work, as I am absolute beginner.
This is one item of the array, otherwise it’s too long to post here.
[{"id":1457,"name":"#1919 Schlu00fcsselanhu00e4nger Nassau","slug":"1919-schluesselanhaenger-nassau","permalink":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","date_created":"2019-04-10T15:07:08","date_created_gmt":"2019-04-10T13:07:08","date_modified":"2024-01-03T07:56:00","date_modified_gmt":"2024-01-03T06:56:00","type":"simple","status":"publish","featured":false,"catalog_visibility":"visible","description":"<p>Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring.<br />nDie grou00dfe Werbeflu00e4che bietet viel Platz fu00fcr Ihr Logo als Lasergravur, Druck oder Pru00e4gung.</p>n<h3 id="bulk-price-table"></h3>n","short_description":"<p>Schlu00fcsselanhu00e4nger Nassau</p>n","sku":"1919","price":"","regular_price":0,"sale_price":"","date_on_sale_from":null,"date_on_sale_from_gmt":null,"date_on_sale_to":null,"date_on_sale_to_gmt":null,"on_sale":false,"purchasable":false,"total_sales":0,"virtual":false,"downloadable":false,"downloads":[],"download_limit":-1,"download_expiry":-1,"external_url":"","button_text":"","tax_status":"taxable","tax_class":"","manage_stock":false,"stock_quantity":null,"backorders":"no","backorders_allowed":false,"backordered":false,"low_stock_amount":null,"sold_individually":false,"weight":"28","dimensions":{"length":"","width":"","height":""},"shipping_required":true,"shipping_taxable":true,"shipping_class":"","shipping_class_id":0,"reviews_allowed":false,"average_rating":"0.00","rating_count":0,"upsell_ids":[],"cross_sell_ids":[],"parent_id":0,"purchase_note":"","categories":[{"id":101,"name":"Schlu00fcsselanhu00e4nger Heizungsentlu00fcftung","slug":"schluesselanhaenger-heizungsentlueftung"}],"tags":[{"id":51,"name":"Schlu00fcsselanhu00e4nger","slug":"schluesselanhaenger"}],"images":[{"id":899,"date_created":"2019-04-01T01:04:00","date_created_gmt":"2019-03-31T21:04:00","date_modified":"2021-03-31T12:28:16","date_modified_gmt":"2021-03-31T08:28:16","src":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","name":"1919","alt":"1919"}],"attributes":[{"id":2,"name":"Zolltarifnummer","slug":"pa_zolltarifnummer","position":0,"visible":true,"variation":false,"options":["79070000000"]},{"id":3,"name":"Werbeanbringung","slug":"pa_werbeanbringung","position":1,"visible":true,"variation":false,"options":["Druck","Gravur"]},{"id":4,"name":"Werbeflu00e4che","slug":"pa_werbeflaeche","position":3,"visible":true,"variation":false,"options":["27 x 15 mm"]},{"id":5,"name":"Abmessungen","slug":"pa_abmessungen","position":4,"visible":true,"variation":false,"options":["88 x 22 x 10 mm"]},{"id":6,"name":"Material","slug":"pa_material","position":5,"visible":true,"variation":false,"options":["Metall"]}],"default_attributes":[],"variations":[],"grouped_products":[],"menu_order":0,"price_html":"","related_ids":[1452,1469,1461,1466,1451],"meta_data":[{"id":42499,"key":"_woosea_brand","value":""},{"id":42500,"key":"_woosea_mpn","value":""},{"id":42501,"key":"_woosea_upc","value":""},{"id":42502,"key":"_woosea_ean","value":""},{"id":42503,"key":"_woosea_gtin","value":""},{"id":42504,"key":"_woosea_optimized_title","value":""},{"id":42505,"key":"_woosea_unit_pricing_measure","value":""},{"id":42506,"key":"_woosea_unit_pricing_base_measure","value":""},{"id":42507,"key":"_woosea_condition","value":""},{"id":42508,"key":"_woosea_age_group","value":""},{"id":42509,"key":"_woosea_installment_months","value":""},{"id":42510,"key":"_woosea_installment_amount","value":""},{"id":42511,"key":"_woosea_exclude_product","value":"no"},{"id":42512,"key":"_woosea_cost_of_good_sold","value":""},{"id":42513,"key":"_woosea_multipack","value":""},{"id":42514,"key":"_woosea_is_bundle","value":""},{"id":42515,"key":"_woosea_energy_efficiency_class","value":""},{"id":42516,"key":"_woosea_min_energy_efficiency_class","value":""},{"id":42517,"key":"_woosea_max_energy_efficiency_class","value":""},{"id":42518,"key":"_et_pb_post_hide_nav","value":"default"},{"id":42519,"key":"_et_pb_page_layout","value":"et_right_sidebar"},{"id":42520,"key":"_et_pb_side_nav","value":"off"},{"id":42521,"key":"_et_pb_use_builder","value":""},{"id":42522,"key":"_et_builder_version","value":"BB|Divi|3.22.7"},{"id":42523,"key":"_et_pb_first_image","value":""},{"id":42524,"key":"_et_pb_truncate_post","value":""},{"id":42525,"key":"_et_pb_ab_stats_refresh_interval","value":"hourly"},{"id":42526,"key":"_et_pb_old_content","value":""},{"id":42527,"key":"_et_pb_enable_shortcode_tracking","value":""},{"id":42528,"key":"_et_pb_custom_css","value":""},{"id":47624,"key":"_product_url","value":""},{"id":47625,"key":"_button_text","value":""},{"id":47626,"key":"_max_variation_sale_price","value":""},{"id":47627,"key":"_min_variation_sale_price","value":""},{"id":47628,"key":"_max_variation_regular_price","value":""},{"id":47629,"key":"_min_variation_regular_price","value":""},{"id":47630,"key":"_max_variation_price","value":""},{"id":47631,"key":"_min_variation_price","value":""},{"id":52885,"key":"_wcj_product_images_meta_custom_on_single","value":""},{"id":52886,"key":"_wcj_product_images_meta_custom_on_archives","value":""},{"id":52887,"key":"_wcj_product_images_hide_image_on_single","value":"no"},{"id":52888,"key":"_wcj_product_images_hide_thumb_on_single","value":"no"},{"id":52889,"key":"_wcj_product_images_hide_image_on_archives","value":"no"},{"id":52890,"key":"_woosea_is_promotion","value":""},{"id":52891,"key":"_woosea_custom_field_0","value":""},{"id":52892,"key":"_woosea_custom_field_1","value":""},{"id":52893,"key":"_woosea_custom_field_2","value":""},{"id":52894,"key":"_woosea_custom_field_3","value":""},{"id":52895,"key":"_woosea_custom_field_4","value":""},{"id":52896,"key":"_unit_base","value":""},{"id":52897,"key":"_unit_product","value":""},{"id":52898,"key":"_unit_price_auto","value":"no"},{"id":52899,"key":"_unit_price_regular","value":""},{"id":52900,"key":"_unit_price","value":""},{"id":52901,"key":"_unit_price_sale","value":""},{"id":52902,"key":"_mini_desc","value":""},{"id":52904,"key":"_free_shipping","value":"no"},{"id":52905,"key":"_service","value":"no"},{"id":52906,"key":"_differential_taxation","value":"no"},{"id":52907,"key":"_ts_gtin","value":""},{"id":52908,"key":"_ts_mpn","value":""},{"id":58759,"key":"_metaseo_metadesc","value":"#1919 Schlu00fcsselanhu00e4nger Nassau"},{"id":58889,"key":"_metaseo_metatitle","value":"#1919 Schlu00fcsselanhu00e4nger Nassau"},{"id":77834,"key":"bm_customer_price_type","value":"fix"},{"id":77835,"key":"bm_customer_copy_for_group","value":"copy"},{"id":77837,"key":"bm_industrie_price_type","value":"fix"},{"id":77838,"key":"bm_industrie_copy_for_group","value":"copy"},{"id":77840,"key":"bm_autohaus_price_type","value":"fix"},{"id":77841,"key":"bm_autohaus_copy_for_group","value":"copy"},{"id":77843,"key":"bm_psi_price_type","value":"fix"},{"id":77844,"key":"bm_psi_copy_for_group","value":"copy"},{"id":77846,"key":"bm_guest_price_type","value":"fix"},{"id":77847,"key":"bm_guest_copy_for_group","value":"copy"},{"id":77848,"key":"bm_customer_bulk_copy_for_group","value":"copy"},{"id":77850,"key":"bm_industrie_bulk_copy_for_group","value":"copy"},{"id":77851,"key":"bm_autohaus_bulk_copy_for_group","value":"copy"},{"id":77853,"key":"bm_psi_bulk_copy_for_group","value":"copy"},{"id":77854,"key":"bm_guest_bulk_copy_for_group","value":"copy"},{"id":77855,"key":"_unit","value":""},{"id":77856,"key":"_sale_price_label","value":""},{"id":77857,"key":"_sale_price_regular_label","value":""},{"id":77858,"key":"_min_age","value":""},{"id":77859,"key":"_et_pb_truncate_post_date","value":""},{"id":85824,"key":"_min_guest_price","value":"0"},{"id":85825,"key":"_min_guest_price_saved","value":"2022-06-27-07-04"},{"id":94707,"key":"_min_psi_price","value":"0"},{"id":94708,"key":"_min_psi_price_saved","value":"2022-01-14-10-26"},{"id":113253,"key":"_delivery_time_countries","value":[]},{"id":113254,"key":"_gzd_version","value":"3.15.5"},{"id":113255,"key":"_hs_code","value":""},{"id":113256,"key":"_manufacture_country","value":"0"},{"id":113257,"key":"_yoast_wpseo_metadesc","value":"%%sitename%% Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring."},{"id":113258,"key":"_yoast_wpseo_content_score","value":"90"},{"id":113259,"key":"_yoast_wpseo_estimated-reading-time-minutes","value":"1"},{"id":173666,"key":"bm_psi_bulk_prices","value":{"1":{"bulk_price":"1.6","bulk_price_from":"500","bulk_price_to":"999","bulk_price_type":"fix"},"2":{"bulk_price":"1.4","bulk_price_from":"1000","bulk_price_to":"1999","bulk_price_type":"fix"}}},{"id":221924,"key":"bm_all_customers_copy_for_group","value":"copy"},{"id":221925,"key":"bm_all_customers_bulk_copy_for_group","value":"copy"},{"id":221926,"key":"_defect_description","value":""},{"id":221927,"key":"_allergen_ids","value":[]},{"id":221928,"key":"_warranty_attachment_id","value":""},{"id":221929,"key":"_photovoltaic_system","value":"no"},{"id":221930,"key":"_used_good","value":"no"},{"id":221931,"key":"_defective_copy","value":"no"},{"id":221932,"key":"_is_food","value":"no"},{"id":221933,"key":"_customs_description","value":""},{"id":221934,"key":"_is_non_returnable","value":"no"},{"id":221935,"key":"_yoast_wpseo_primary_product_cat","value":""},{"id":221936,"key":"_yoast_wpseo_primary_product_nutrient","value":""},{"id":221937,"key":"_yoast_wpseo_wordproof_timestamp","value":""},{"id":295905,"key":"_et_dynamic_cached_shortcodes","value":[]},{"id":295906,"key":"_et_dynamic_cached_attributes","value":{"title_font":"|700|||||||","sale_badge_font":"|700|||||||","price_font":"|700|||||||","sale_price_font":"|700|||||||"}}],"stock_status":"instock","has_options":false,"post_password":"","global_unique_id":"","yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https://yoast.com/wordpress/plugins/seo/ -->n<title>#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion</title>n<meta name="description" content="Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring." />n<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />n<link rel="canonical" href="https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/" />n<meta property="og:locale" content="de_DE" />n<meta property="og:type" content="article" />n<meta property="og:title" content="#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion" />n<meta property="og:description" content="Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring." />n<meta property="og:url" content="https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/" />n<meta property="og:site_name" content="Gifts & Promotion" />n<meta property="article:modified_time" content="2024-01-03T06:56:00+00:00" />n<meta property="og:image" content="https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg" />nt<meta property="og:image:width" content="800" />nt<meta property="og:image:height" content="800" />nt<meta property="og:image:type" content="image/jpeg" />n<meta name="twitter:card" content="summary_large_image" />n<meta name="twitter:label1" content="Geschu00e4tzte Lesezeit" />nt<meta name="twitter:data1" content="1 Minute" />n<script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","url":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","name":"#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion","isPartOf":{"@id":"https://www.xxxxxx.biz/#website"},"primaryImageOfPage":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage"},"image":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage"},"thumbnailUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","datePublished":"2019-04-10T13:07:08+00:00","dateModified":"2024-01-03T06:56:00+00:00","description":"Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring.","breadcrumb":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/"]}]},{"@type":"ImageObject","inLanguage":"de-DE","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage","url":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","contentUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","width":800,"height":800,"caption":"1919"},{"@type":"BreadcrumbList","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https://www.xxxxxx.biz/"},{"@type":"ListItem","position":2,"name":"Produkte","item":"https://www.xxxxxx.biz/shop/"},{"@type":"ListItem","position":3,"name":"#1919 Schlu00fcsselanhu00e4nger Nassau"}]},{"@type":"WebSite","@id":"https://www.xxxxxx.biz/#website","url":"https://www.xxxxxx.biz/","name":"Gifts & Promotion 2023","description":"","publisher":{"@id":"https://www.xxxxxx.biz/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.xxxxxx.biz/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de-DE"},{"@type":"Organization","@id":"https://www.xxxxxx.biz/#organization","name":"Ambassador Int. GmbH & Co. KG","url":"https://www.xxxxxx.biz/","logo":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https://www.xxxxxx.biz/#/schema/logo/image/","url":"https://www.xxxxxx.biz/wp-content/uploads/2019/05/ambass.png","contentUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/05/ambass.png","width":600,"height":102,"caption":"Ambassador Int. GmbH & Co. KG"},"image":{"@id":"https://www.xxxxxx.biz/#/schema/logo/image/"}}]}</script>n<!-- / Yoast SEO plugin. -->","yoast_head_json":{"title":"#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion","description":"Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","og_locale":"de_DE","og_type":"article","og_title":"#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion","og_description":"Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring.","og_url":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","og_site_name":"Gifts & Promotion","article_modified_time":"2024-01-03T06:56:00+00:00","og_image":[{"width":800,"height":800,"url":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","type":"image/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Geschu00e4tzte Lesezeit":"1 Minute"},"schema":{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","url":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/","name":"#1919 Schlu00fcsselanhu00e4nger Nassau — Gifts & Promotion","isPartOf":{"@id":"https://www.xxxxxx.biz/#website"},"primaryImageOfPage":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage"},"image":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage"},"thumbnailUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","datePublished":"2019-04-10T13:07:08+00:00","dateModified":"2024-01-03T06:56:00+00:00","description":"Gifts & Promotion Pfiffiger Schlu00fcsselanhu00e4nger mit Heizungs-Entlu00fcftungs-Schlu00fcssel und schu00f6nem, breiten Flachring.","breadcrumb":{"@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/"]}]},{"@type":"ImageObject","inLanguage":"de-DE","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#primaryimage","url":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","contentUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/03/1919.jpg","width":800,"height":800,"caption":"1919"},{"@type":"BreadcrumbList","@id":"https://www.xxxxxx.biz/produkt/1919-schluesselanhaenger-nassau/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https://www.xxxxxx.biz/"},{"@type":"ListItem","position":2,"name":"Produkte","item":"https://www.xxxxxx.biz/shop/"},{"@type":"ListItem","position":3,"name":"#1919 Schlu00fcsselanhu00e4nger Nassau"}]},{"@type":"WebSite","@id":"https://www.xxxxxx.biz/#website","url":"https://www.xxxxxx.biz/","name":"Gifts & Promotion 2023","description":"","publisher":{"@id":"https://www.xxxxxx.biz/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.xxxxxx.biz/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de-DE"},{"@type":"Organization","@id":"https://www.xxxxxx.biz/#organization","name":"Ambassador Int. GmbH & Co. KG","url":"https://www.xxxxxx.biz/","logo":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https://www.xxxxxx.biz/#/schema/logo/image/","url":"https://www.xxxxxx.biz/wp-content/uploads/2019/05/ambass.png","contentUrl":"https://www.xxxxxx.biz/wp-content/uploads/2019/05/ambass.png","width":600,"height":102,"caption":"Ambassador Int. GmbH & Co. KG"},"image":{"@id":"https://www.xxxxxx.biz/#/schema/logo/image/"}}]}},"hs_code":"","customs_description":"","manufacture_country":"0","shipping_dimensions":{"length":"","width":"","height":""},"unit":[],"unit_price":{"base":"","product":"","price_auto":false,"price":"","price_regular":"","price_sale":"","price_html":""},"mini_desc":"","defect_description":"","min_age":"","gtin":"","mpn":"","sale_price_label":[],"sale_price_regular_label":[],"delivery_time":[],"country_specific_delivery_times":[],"free_shipping":false,"service":false,"used_good":false,"defective_copy":false,"photovoltaic_system":false,"differential_taxation":false,"warranty_attachment_id":"","is_food":false,"food":{"deposit_type":[],"deposit_quantity":1,"deposit":0,"ingredients":"","nutrient_reference_value":"","nutri_score":"","alcohol_content":"","allergen_ids":[],"nutrient_ids":[{"term":0,"value":"","ref_value":""}],"net_filling_quantity":"","drained_weight":"","description":"","distributor":"","place_of_origin":""},"_links":{"self":[{"href":"https://www.xxxxxx.biz/wp-json/wc/v3/products/1457"}],"collection":[{"href":"https://www.xxxxxx.biz/wp-json/wc/v3/products"}]}}]
Is it somehow possible to search for bm_psi_bulk_prices
for example and then get the positions below this key? In this case, there are three price-ranges, but this can change.
1
You have to index the desired item in the array, cast the item to TJSONObject
, and then call Get()
/GetValue()
on it for the desired field. That part you have down. You just have to repeat that for any nested objects/arrays as needed. For example:
var
jsonValue: TJSONValue;
jsonArr: TJSONArray;
jsonObj: TJSONObject;
key: string;
i, j: Integer;
begin
...
jsonValue := ...;
i := ...;
jsonArr := jsonValue as TJSONArray;
jsonObj := arr.Items[i] as TJSONObject;
jsonArr := jsonObj.GetValue('meta_data') as TJSONArray;
for j := 0 to jsonArr.Count-1 do
begin
jsonObj := jsonArr.Items[j] as TJSONObject;
key := jsonObj.GetValue('key').Value;
if key = 'bm_psi_bulk_prices' then
begin
jsonObj := jsonObj.GetValue('value') as TJSONObject;
// use jsonObj.GetValue('1') and jsonObj.GetValue('2') as needed...
Break;
end;
end;
...
end;