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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:02:08+00:00 2026-05-24T08:02:08+00:00

I use ExtJS4 to request data in format id-label (‘id’-‘rdfs:label’ in my case). I

  • 0

I use ExtJS4 to request data in format id-label (‘id’-‘rdfs:label’ in my case).

I have complex structure of JSON response:

[
{
"@" : "msg:M_8CE1C07B1CFC469",
"a" : "msg:Message",
"msg:in-reply-to" : "msg:M4e32b0b7e37ae",
"msg:sender" : "pacahon",
"msg:reciever" : "Ennoia:DocumentTypesStore.listTemplates",
"msg:result" : [
    {
     "@" : "user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8",
     "dc:creator" : "auth:user1",
     "dc:identifier" : "881fc0a8-2912-4964-86c6-adad4a713eb8",
     "rdfs:label" : "undefined|ru",
     "rdfs:subClassOf" : ["user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8_v_1_f_0","user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8_v_1_f_1","user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8_v_1_f_2","user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8_v_1_f_3","docs:Document"]
    },
    {
     "@" : "user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877",
     "dc:creator" : "auth:user1",
     "dc:identifier" : "ef54ecef-8e19-41ea-b1cc-2bc4ebb40877",
     "rdfs:label" : "type1|ru",
     "rdfs:subClassOf" : ["user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877_v_1_f_0","user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877_v_1_f_1","user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877_v_1_f_2","user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877_v_1_f_3","docs:Document"]
    }],
"msg:status" : "ok",
"msg:reason" : "запрос выполнен: авторизованны все найденные субьекты :     2"
}
] 

I want to read this json in my store and get something like this:

[{"@" : "user_onto:881fc0a8-2912-4964-86c6-adad4a713eb8"
  "rdfs:label" : "undefined|ru"},
 {"@" : "user_onto:ef54ecef-8e19-41ea-b1cc-2bc4ebb40877"
  "rdfs:label" : "type1|ru"}]

Notice, I don’t want to change this JSON response (remove or add braces).

  • 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-24T08:02:09+00:00Added an answer on May 24, 2026 at 8:02 am

    I used API Doc to solve my problem (Ext.data.reader.Reader):

            Ext.define("Response", {
                    extend: 'Ext.data.Model',
                    fields: [
                        {name:'id', type:'string', mapping:'@'}
                    ],
    
                    hasMany: {model: 'Message', name: 'messages', associationKey:'msg:result'},
                });
    
            Ext.define("Message", {
                    extend: 'Ext.data.Model',
                    fields: [{name:'id', type:'string', mapping:'@'}, {name:'title', type:'string', mapping:'rdfs:label'}],
                    belongsTo: 'Response'
              });
    

    Then I add Response as model for my JsonStore:

            proxy: {
                    type: 'ajax',
                    url: './controller.php?class=DocumentTypesStore&action=get&method=listTemplates',           
                    method: "POST",
                    actionMethods: {read: 'POST'},          
                    reader: {
                        type: 'json',
                        root: [],
                                idProperty: '@'
                    }
                }
    

    And I can read values now:

        jsonstore.on('load', function(){
            var response = jsonstore.first();
            console.log(response.get('id'));
            response.messages().each(function(message) {
                console.log(message.get('id'));
            });         
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problems with Extjs4 librairie. I want to use treeEditor component. Firebug
I use Extjs 4. I have grid within row expander with data from the
in my first ExtJs4 project i use a editable grid with the feature rowbody
i have a backbone.js api i want to use in an ExtJS app. Extjs
Use Case Show a photo uploaded by the user in a square box with
I am trying to use Ext.Ajax.request in ExtJS 4.02a but it will not run
I wanna use a chart in my new ExtJS4 application. The axes render just
I tried to use ExtJS with a JSON database but I keep getting the
I have a problem. I use extjs grid . This grid will be refreshed
I use ExtDesigner designed a window, and the generated json is like: { xtype:

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.