PDA

View Full Version : How to model and array in a store?



dancha
27 Sep 2011, 2:36 AM
I've got some data that looks like this:

{name: 'stock1', returns: [0.56,0.45,0.03,0.04,-0.06]}

the type of those returns....just leave it blank? i know there isn't an array type and i really don't need to do anything with it except return the array for a given name when needed.

skirtle
27 Sep 2011, 3:16 AM
Yep, leave it blank. The default is to leave the value unmodified, so there's no reason it can't be an array. There's all sorts of complicated things you could do to explicitly support arrays but if all you need is for it to leave it as-is then there's no point.

dancha
27 Sep 2011, 3:54 AM
that's what i thought. just wanted to validate that...thanks