Veriye uygun json yapmak

{
	"name": "", 
	"_imageUrl": "https://raw.githubusercontent.com/bumbeishvili/Assets/master/Projects/D3/Organization%20Chart/cto.jpg", 
	"area": "", 
	"profileUrl": 
	"http://example.com/employee/profile",
       	"office": "CTO office", 
	"tags": "Ceo,tag1,manager,cto", 
	"isLoggedUser": false, 
	"unit": {"type": "business", "value": "Business first"}, 
	"positionName": "Cheaf Executive Officer ", 
	"children": []
}

elime soyle bir json var ve databaseden gelen deyerleri bu js uyqun hale getirmem gerekli soyle bir database var elimde suan “urunuSatan SatinAlan” bu iki sutundaki verileri bu json yazmam gerekli ama sorunsuki satin alan kimsede baska birine urun satan birisi ola bilir o yuzden children ilave etmem gerekli ama bir turlu cozemedim

Ne yapmak istediğinizi pek anlamadım ama sanırım şu işinize yarar:

[
    {
        "name": "name1",
        "_imageUrl": "https://raw.githubusercontent.com/bumbeishvili/Assets/master/Projects/D3/Organization%20Chart/cto.jpg",
        "area": "",
        "profileUrl": "http://example.com/employee/profile",
        "office": "CTO office",
        "tags": "Ceo,tag1,manager,cto",
        "isLoggedUser": false,
        "unit": { "type": "business", "value": "Business first" },
        "positionName": "Cheaf Executive Officer ",
        "seller": "Bakkal Mustafa",
        "buyer": "Filanca Ahmet"
    },
    {
        "name": "name2",
        "_imageUrl": "https://raw.githubusercontent.com/bumbeishvili/Assets/master/Projects/D3/Organization%20Chart/cto.jpg",
        "area": "",
        "profileUrl": "http://example.com/employee/profile",
        "office": "CTO office",
        "tags": "Ceo,tag1,manager,cto",
        "isLoggedUser": false,
        "unit": { "type": "business", "value": "Business first" },
        "positionName": "Cheaf Executive Officer ",
        "seller": "Falanca Market",
        "buyer": "Bakkal Mustafa"
    }
]

Ya da şu:

{
    "name1": {
        "_imageUrl": "https://raw.githubusercontent.com/bumbeishvili/Assets/master/Projects/D3/Organization%20Chart/cto.jpg",
        "area": "",
        "profileUrl": "http://example.com/employee/profile",
        "office": "CTO office",
        "tags": "Ceo,tag1,manager,cto",
        "isLoggedUser": false,
        "unit": { "type": "business", "value": "Business first" },
        "positionName": "Cheaf Executive Officer ",
        "seller": "Bakkal Mustafa",
        "buyer": "Filanca Ahmet"
    },
    "name2": {
        "_imageUrl": "https://raw.githubusercontent.com/bumbeishvili/Assets/master/Projects/D3/Organization%20Chart/cto.jpg",
        "area": "",
        "profileUrl": "http://example.com/employee/profile",
        "office": "CTO office",
        "tags": "Ceo,tag1,manager,cto",
        "isLoggedUser": false,
        "unit": { "type": "business", "value": "Business first" },
        "positionName": "Cheaf Executive Officer ",
        "seller": "Falanca Market",
        "buyer": "Bakkal Mustafa"
    }
}

hayir bana yukardaki hazir olan json gerekli json zaten elimde mevzut asil mesele sql okudugum verileri bu json dogru bir sekilde ilave etmek