Support » Plugin: JSON API » [Plugin: JSON API] Displaying JSON Custom Fields

  • Hi there,

    I’m using Sencha Architect and I’m trying to get the custom field values from this JSON response created with the WordPress JSON API: http://theojai.net/?json=get_recent_…pcf-deal-rules

    I’ve created a model, but I’m just not sure what to type in the “Mapping” fields for each of those custom_fields in the JSON response. Any thoughts?

    Here is my Sencha model. What do I put in the mapping areas for the last three?:

    Ext.define('Ojai.model.Deal', {
    extend: 'Ext.data.Model',
    
    config: {
        fields: [
            {
                name: 'Title',
                mapping: 'title'
            },
            {
                name: 'Business',
                mapping: 'custom_fields.wpcf-deal-business-owner'
            },
            {
                name: 'Expiry',
                mapping: 'wpcf-deal-expiry'
            },
            {
                name: 'Terms',
                mapping: 'wpcf-deal-rules'
            }
        ]
    }
    });

    http://wordpress.org/extend/plugins/json-api/

Viewing 1 replies (of 1 total)
  • Need this feature also, hope it can be done. [RESOLVED]
    Never mind – I’ve just found out that it is also in the JSON data – I Use “Types” to control over the custom fields – so the JSON Display: “wpcf-FIELD_NAME”:[“FIELD_DATA”].
    thanks, love this plugin 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: JSON API] Displaying JSON Custom Fields’ is closed to new replies.