

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Create nested JSON object in PHP?
JSON structure can be created with the below code −
$json = json_encode(array( "client" => array( "build" => "1.0", "name" => "xxxx", "version" => "1.0" ), "protocolVersion" => 4, "data" => array( "distributorId" => "xxxx", "distributorPin" => "xxxx", "locale" => "en-US" ) ));
- Related Questions & Answers
- Print JSON nested object in JavaScript?
- Constructing a nested JSON object in JavaScript
- How can we parse a nested JSON object in Java?
- Get value for key from nested JSON object in JavaScript
- Create array from JSON object JavaScript
- How to create a JSON Object using Object Model in Java?
- How to only get the data of the nested JSON object in MongoDB?
- PHP Nested Exception
- How I can create Python class from JSON object?
- Retrieve values from nested JSON array in MongoDB?
- How to access nested json objects in JavaScript?
- How to create a JSON Array using Object Model in Java?
- JSON group object in JavaScript
- How to get a JSON field in a nested JSON using Rest Assured?
- How to create a JSON object in JavaScript? Explain with an example.
Advertisements