Not really a WordPress question, but I’ll bite.
That data is JSON. To manipulate it with PHP you need to decode it with json_decode()
. Then you can treat it as a PHP object.
So to access the values you’d mention, and assuming the JSON is in a variable named $json
:
$object = json_decode( $json );
$staff_name = $object->items[0]->staff_name;
$coupon = $object->coupon;
Related Posts:
- Storing Array from returned database query and using the array in a new query
- Unserializeing multiple column values that are stored in one database results variable
- save array of objects with update_option
- How do I make an HTML table from a database table?
- Metabox repeating fields – radio buttons not saving correctly
- How can merge two arrays values in one array and save in database
- Does WordPress cache get_user_meta() results?
- Refresh page after update_post_meta
- Search and Replace in database: How to replace data in SQL dump file on Windows?
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- Compare two meta key values against each other inside the get_posts array?
- Why WordPress uses 4 tables to manage terms
- WP database error for comments_popup_link()
- WP_User_Query order by meta_key that is an array
- No wp-config.php file on local install of wordpress – site still displays
- How to create Sub Sub domain Multi User blogs?
- How to find the output of contact form 7 shortcode? [closed]
- Issue with foreach on duplicate meta_key’s
- Can an array be used as a meta_query value?
- List of posts by day of the week
- Different database query in function.php using mysqli
- ‘orderby’ => ‘rand’ alternative for better performance?
- Store and Work with huge array in WP [closed]
- Adding Custom Forms
- how can i show only the parents in owl-carousel?
- Create shortcodes within foreach loop (using array)
- Is it necessary to sanitize wp_set_password user input?
- Create WP_Query to search for posts by their categories or their parent/child categories
- Reprinting tags with all attributes
- Update results, Before deleting the related category [closed]
- How WordPress reacts to a lack of memory of the server [closed]
- database sent to a JSON file
- Checking array against author id in loop
- Grouping posts by a custom meta value
- Filtering a Database Query
- Display Data in Table from External Database in WP using Shortcodes
- Blob file download problem
- How to retrieve the data from the sever and displaying it in a page?
- wpdb prepare insert table doesn’t work
- Error while setting role
- How to use two meta_compare in an array?
- Loop over Array and get the distinct ids
- Remove empty terms from array, sort alphabetically, update back to repeating field
- Only show first image in foreach loop
- How can I find the cause of a 500 server error?
- I can’t update my data through $wpdb
- Can’t successfully check if post with title exist in database
- Lost in trying to create user database system
- Delete database record using plugin from admin panel
- Filter by field with array value in ACF on WP REST API
- Wpdb get->results to out the the month from the db
- Filter results from a serialized string to use on statistics
- How to add data to a custom field at the wp_users table?
- Only load certain artists on this page
- add the value of a variable returned in a while loop [closed]
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Add row to custom database Table and delete all rows older than 1 day
- using images in next/previous_post_link [closed]
- Using PHP Code Snippets to query a database, $dbconnection->get_results is outputting nothing
- Database entry removed on browser refresh, Ajax PHP jQuery
- Convert a column of a table containing an Array as response in HTML
- Please help! I have a problem with getting wordpress databas
- Display just one post from a loop of 5 posts?
- Error establishing a database connection (Set-up locally)
- Limiting posts based on nested meta_query
- Preserving backslashes in post_content
- Error establishing a database connection (configuration)
- How to insert multiple rows and columns in database using array
- ACF – Get ID of relationship field in flexible content
- Using custom php to connect to database blocks wp from accessing galery pictures
- Replace an array (with identical values) with another array in the_content
- How do I fetch a data from an external database into my wordpress homepage
- How to display post_content from database in different on template page?
- How can get all users by current user meta (array)?
- Get a list of tags present in a paged front page
- direct query to post_meta table
- special characters not supporting in wordpress
- How to set max users to 17.000
- Page returning ID from array, how to return the correct values for post in acf wordpress
- How to fetch results from database
- Best way to define a database with product codes and back-end support?
- How to connect database table to each registered wordpress user.
- How to get values from wordpress listings and use them in javascript array?
- Repeatable field within repeatable group of fields
- Querying multiple meta_keys in WordPress SQL query
- Trying to post information from a remote database to wordpress page
- get_permalink returning first letter
- Create an unique ID number after submit form
- PHP Call to External Database
- How do I empty a specific meta_value for all users in PHP
- Create custom table for wordpress custom registration flow
- Custom form that stores data in mysql database
- How to get data (not value or name) from radio options to POST to database
- Creating a table via dbDelta
- wpbd to connect to a VPS mysql database
- How to group by column a and sum column b and c in a php array
- Retrieve data from external database and insert back in
- How to get the last date updated of postmeta?
- Putting form result in my database
- PHP how to submit array elements to database