Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7567253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:37:11+00:00 2026-05-30T14:37:11+00:00

Suppose I have a json string like this: { … key1:value1; … } with

  • 0

Suppose I have a json string like this:
{ … “key1″:”value1”; … }
with a key1-value1 pair somewhere deep down the json structure (which includes other things such as array, dictionary, etc…). I don’t know exactly (and don’t care) how the exact structure of the json is.
Is there a simple way to extract the “value1” ? (if there are 2 “key1” in the json string then I just need the first one).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:37:13+00:00Added an answer on May 30, 2026 at 2:37 pm

    As far as I know, you have no chance of doing it manually.
    If you really don’t know what’s the structure of the JSON string you’re expecting, you can try a graph search approach, such as DFS (http://en.wikipedia.org/wiki/Depth-first_search).

    For every key, check if it is an array.
    If so, go inside and repeat the procedure. If nothing was found in a given array, backtrack.
    Interrupt your process once you have found your key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a url like: http://example.com/get-users which returns a JSON object of all
Suppose I have a json object that looks like: { id: 1, name: john
I have a string which gets serialized to JSON in Javascript, and then deserialized
Suppose I have a stringbuilder in C# that does this: StringBuilder sb = new
Let's suppose that we have the following JSON Object that describes a Person: {
Man this JSON thing is chewing away at my day. Is it suppose to
I have a JSON structure; { books: [ {id: book1, title: Book One}, {id:
Suppose I have a remote JAX-RS JSON API from a server running Tomcat. I
I want to deserialize a JSON string which does not necessarily contain data for
suppose I have a JSON that prints out {_id :4e3f2c6659f25a0f8400000b, confirmation_code:TWLNX8BT, confirmed :true, created_at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.