Forgive me if this is a silly question, but I'm struggling with something. Here's the scenario:
I currently have the following object:
obj = {to:this.to,all:[]};
all:[{},{},{},...]
however, this isn't crucial for now
When I use JSON.stringify(obj.all)
, it only returns []
without including all
.
Is there a way to achieve { all: [] }
instead?