Thank you for that Stefan.

On 10 August 2017 at 14:02, Stefan Klein <st.fankl...@gmail.com> wrote:

> Hi
>
> 2017-08-10 13:12 GMT+02:00 John Le Brasseur <johnlebrass...@gmail.com>:
> >
> > Hi.
> > I am trying to create a generic document update handler.
> >
> > I am using:
> >
> > function(doc, req) {var field = req.query.field;  var value =
> > req.query.value; var message = 'set '+field+' to '+value;  doc[field] =
> > value; return [doc, message];  }
> >
> > This works ok with simple json but not with a nested object such as
> > "abc":{"ax":"one", "by":"two" ...}
>
>
> We use a _very_ stripped down version of lodash as a commonjs module.
> lodash provides a set and get function which does what you need.
>
> regards,
> Stefan
>



-- 
Kind regards,

John Le Brasseur
+27  73 157 5605
+27 11 431 0624

Reply via email to