I’m a bit confused by how the code relates, but here’s how I would work with the data in the provided screenshot.
This is looping through the data array and accessing the quoted USD, if it exists.
I’m adding the prices to an array by the object’s ID just to give you an example.
$prices = array();
foreach ( self::$remote_data['data'] as $data ) {
if ( ! isset( $data->quote ) || ! isset( $data->quote->USD ) ) {
continue;
}
$prices[ $data->id ] = $data->quote->USD->price;
}
Related Posts:
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- How to display “META” array in register_taxonomy
- WordPress API only returning HTML
- Appointment booking system in WordPress
- importing third party json feed as custom post type [closed]
- get post type plural
- REST API: How can I restrict a custom post type to only be accessible by authenticated users?
- How to create download links based on Custom Fields with Rewrite API
- Full-Ajax Theme: parseJSON error while building a JSON object from a WordPress custom template
- Custom post metadata not appearing in public API
- Recommended way to remove WP REST API returned data for custom post
- How would you associate location data with a post?
- Custom Post-to-Post with multiple parents?
- How do I get the intended post type of a revision post?
- Make parts of your wordpress website completely built with data from external APIs?
- Database to page routing API?
- Exclude objects from WordPress API based from ACF field using rest_prepare_{$post_type}
- Pros and cons of a custom page vs custom post type template file
- Creating tags via API
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- Using wp_localize_script to get data from cpt and pass it to maplace-js locations
- CRUD operations in wordpress
- Api rest_route 404 while building filter for custom posts (filtered by multiple meta keys / custom fields)
- WordPress custom API endpoint – how to make the request more flexible
- Custom REST endpoint not working to retrieve single posts (“rest_no_route”)
- Getting a GET error in console – 404 not found for wp-json
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- WordPress as a backend for external service? [closed]
- Importing JSON feed giving Notice: Array to string conversion error
- Custom permalink structure for remote content pages
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- ForEach Loop iterates only once when inserting product variations
- Sync posts via JSON API
- Create/populate Custom Posts ACF fields from external JSON file
- Use a template for a specific url slug without creating a page
- Publishing failed. The response is not a valid JSON response
- How to Grab Anime info using Jikan API and fill the value in Metabox
- How do I use URL to fetch all posts of a particular custom post type?
- Convert Custom Post Data to Javascript Array for Autocomplete
- Insert custom post data in to MailChimp campaign email
- wp_insert_post not working for custom post type?
- Custom plugin contact form connecting to mailchimp API
- display posts, pages and custom post types from another wordpress site
- How to consume external API from WordPress post editor and display the response data in the custom field?
- Post current post type to my Ajax
- How to add a post page from a button without reloading
- Yahoo Finance All Currencies quote API Documentation
- How do test if a post is a custom post type?
- Where to put my code: plugin or functions.php?
- What does this PHP function code mean? [closed]
- Remove slug from custom post type post URLs
- How to disable the single view for a custom post type?
- Custom post types, taxonomies, and permalinks
- Query all posts where a meta key does not exist
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to get all taxonomies of a post type?
- How to sort the admin area of a WordPress custom post type by a custom field
- How to create a custom search for custom post type?
- Deregister custom post types
- Can I assign a template to a custom post type?
- Permalinks: custom post type -> custom taxonomy -> post
- Should I use custom post types or a custom database tables for plugin development?
- Enable revisions for custom post type
- Extending the search context in the admin list post screen
- How do I query a custom post type with a custom taxonomy?
- Adding a Custom Post Type into the menu screen
- Pagination not working with custom loop
- How to Add Tags to Custom Post Type?
- How come Featured Image isn’t showing up in my Custom Post Type?
- Custom Post Type URL Rewriting?
- Add category base to url in custom post type/taxonomy
- Include custom taxonomy term in search
- WP Rest API – How to get featured image
- Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu
- Adding ‘menu order’ column to custom post type admin screen
- Capabilities and Custom Post Types
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- what is the correct way to compare dates in a WP query_posts meta_query
- Use register_post_type() to modify an existing post type
- Custom Taxonomy specific to a Custom Post type
- Renaming Custom Post Types and Taxonomies
- List all posts in custom post type by taxonomy
- Redeclare/Change Slug of a Plugin’s Custom Post Type
- Allow member to have access to custom post type only. Permission to only edit their own posts
- Mixing custom post type and taxonomy rewrite structures?
- Advanced search form with filters for custom taxonomies and custom fields
- Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?
- Resolve a custom post type name vs. page permalink conflict (same slug)
- Get custom post_type’s archive URL
- Enable Gutenberg on custom post type
- Is there a way to get N number of WYSIWYG editors in a custom post type?
- Can multiple custom post types share a custom taxonomy?
- How to Add Custom Fields to a Custom Post Type?
- Hook for post and page load
- How to enqueue scripts on custom post add/edit pages?
- How to display value of custom fields in page
- Where are wordpress custom types stored?
- Using save_post to replace the post’s title
- Custom Post Type pages are “not found”
- Possible to hide Custom Post Type UI/Menu from specific User Roles?