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 8792367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:58:10+00:00 2026-06-13T22:58:10+00:00

I have this Json from URL: { type:FeatureCollection, features: [ { type:Feature, properties: [

  • 0

I have this Json from URL:

{
  "type":"FeatureCollection",
  "features":
    [
      {
        "type":"Feature",
        "properties":
          [
            {
              "type":"colliers",
              "thumb":"upload\/estate\/135\/thumb_1. Prologis Park Wroclaw I.jpg",
              "name_pl":"Prologis Park Wroc\u0142aw I",
              "name_en":"Prologis Park Wroc\u0142aw I",
              "completearea":"167 000",
              "completeareaunit":"m2",
              "workingarea":"",
              "workingareaunit":"m2",
              "id_type":"3",
              "id":"135",
              "lon":16.939201369628,
              "lat":51.037378299619,
              "images":["public\/upload\/estate\/135\/1. Prologis Park Wroclaw I.jpg"]
            }
          ],
        "geometry":
          {
            "type":"Point",
            "coordinates":[16.939201369628,51.037378299619]
          },
        "crs":
          {
            "type":"name",
            "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}
          }
        },

      {
        "type":"Feature",
        "properties":
          [
            {
              "type":"colliers",
              "thumb":"upload\/estate\/136\/thumb_2. Prologis Park Wroclaw III.jpg",
              "name_pl":"Prologis Park Wroc\u0142aw III",
              "name_en":"Prologis Park Wroclaw III",
              "completearea":"129 500",
              "completeareaunit":"m2",
              "workingarea":"",
              "workingareaunit":"m2",
              "id_type":"3",
              "id":"136",
              "lon":16.928386702881,
              "lat":51.105440250407,
              "images":
                [
                  "public\/upload\/estate\/136\/2. Prologis Park Wroclaw III.jpg"
                ]
            }
          ],
        "geometry":
          {
            "type":"Point",
            "coordinates":[16.928386702881,51.105440250407]
          },
        "crs":
          {
            "type":"name",
            "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}
          }
        },
        .................... more more more...

I need to put my hands on properties in a list.

So it would be features -> properties -> name_en (list of objects like that)

I try this:

JSONParser parser = new JSONParser();
Object obj = parser.parse(Json_str);    
JSONObject jsonObject = (JSONObject) obj;
JSONArray jsonFeaturesArr = new JSONArray(jsonObject.getJSONArray("features")); 

in order to create first Json Array, but I can’t even do that. I get error:
The method getJSONArray(String) is undefined for the type JSONObject

(I have the same error for “getJSONObject”). Sth must be missing, I’m a java/android Newbie.

If I solve error how do I go deeper into Json?

Thanx in advance for Help.

  • 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-06-13T22:58:10+00:00Added an answer on June 13, 2026 at 10:58 pm

    try as:

    JSONObject jSONObject = new JSONObject(jsonString);
    String str_type=jSONObject.getString("type");
    
    // using JSONArray
    JSONArray featuresArr = jSONObject.getJSONArray("features");
      for (int i=0; i<featuresArr.length; i++){
        JSONObject anotherjsonObject = featuresArr.getJSONObject(i);
        //access the fields of that json object
        String str_type_one=anotherjsonObject.getString("type");
       JSONArray featuresArr_properties = anotherjsonObject.getJSONArray("properties");
    
       JSONObject propertiesjsonObject = featuresArr_properties.getJSONObject(0);
       String str_type=propertiesjsonObject.getString("type");
       String str_type=propertiesjsonObject.getString("thumb");
       String str_type=propertiesjsonObject.getString("name_pl");
       String str_type=propertiesjsonObject.getString("name_en");
     ////parse all items ...........
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a json feed from this URL which contains 20 fields and I
I have a sortable that it was loaded from JSON files. This is a
I am getting JSON string from website. I have data which looks like this
I have a json file exported from phpmyadmin, it looks like this(utf-8 file): [{user_email:
I have a view model coming from the server as json like this {
I have a JSON which I get from web application. I try this parse
I have this Json returned from controller : public ActionResult VerifyApp(string recurrence) { List<foo>
I have this ajax code: return $.ajax({ type: POST, url: somefile.php, cache:false, data: {
i have this problem. my function is this $.ajax({ type: POST, url: /controller/CreateList, contentType:
In a JS file I have this: $.ajaxSetup({ type: 'POST', contentType: application/json; charset=utf-8, dataType:

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.