The problem of stuffing objects into objects

the backend gave me a json data format to pass over. There are still objects in the object. How to write

related codes

/ / Please paste the code text below (do not replace the code with pictures)
json format:

      {
        "cityid":"100003530",
        "region": 
           {
             "region":"123"
           },
        "cityname":"nihao"
      }

if it is simple

     {
        "cityid":"100003530",
        "region": "123",
        "cityname":"nihao"
      }
      var obj={};
      obj.cityid="100003530";
      obj.region="123";
      obj.cityname="nihao";

can I ask how to write something like the first one?


I don't understand what the question is trying to say

let obj = {
        "cityid":"100003530",
        "region": 
           {
             "region":"123"
           },
        "cityname":"nihao"
      }
      obj.cityid = "100003530"
      obj.region = {
             "region":"123"
           }
      obj.region = {}
      obj.region.region = "123"
      obj.cityname = "nihao"

obj.region= {region: "123"} ;


      var obj={};
      obj.cityid='100003530';
      obj.region={region: '123'};
      obj.cityname='nihao';

write the value of the attribute region in your object as an object. obj.region= {region: "123"}


clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6fc0c-286.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6fc0c-286.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?