satauros
06/25/2024, 6:57 AMsatauros
06/25/2024, 6:59 AMsatauros
06/25/2024, 6:59 AMbrettpr
06/25/2024, 8:38 AMsatauros
06/25/2024, 8:43 AMsatauros
06/25/2024, 8:44 AMfoo[1].bar[1]
that should be placed at the [undefined array element]
location.satauros
06/25/2024, 1:15 PMMatt Jones
06/25/2024, 2:27 PMbkbk
06/25/2024, 2:27 PM// Given
struct1.lorem.ipsum={};
arr1=["",struct1];
struct2={"bar":arr1};
struct3={"foo":[struct2]};
//writedump(struct3);
struct4.bar.foo={};
arr2=[struct4];
struct5={"lorem":arr2};
struct6={"foo":[struct5]};
//writedump(struct6);
// Your result implies you wish
// to append struct2 and struct5
structAppend(struct2,struct5,true)
// The combined (or, as you say, "merged") result
combinedStruct={"foo":[struct2]};
writedump(combinedStruct);
Adam Cameron
Example input:Instead of passing us a picture of it being dumped, can you post the code that created it. This helps us reproduce the situation without having to type it ourselves. This applies to any situation, not just this one. A picture of code / its output / error messages is seldom the best primary way of sharing such information. Text. Start with text that can be copy and pasted and reused.
satauros
06/26/2024, 8:05 AMAdam Cameron
Adam Cameron
s1
and s2
have the same key, and they're not both structs (so accordingly can be handled recursively). Throw a CannotBeMergedException
?satauros
06/26/2024, 9:16 AMAdam Cameron
Adam Cameron