javascript - Lodash split object -
how can use lodash split following object 2 arrays
the object
{"m": [ "alpha", "beta", "zeta"], "f": [ "alpha", "omega" ]} i want be
var first = [ "alpha", "beta", "zeta"] // contents of m var second = [ "alpha", "omega" ] // contents of f is possible in lodash? , if not how possible in vanillajs
thanks
you don't need lodash this. just:
var first = theobject.m; var second = theobject.f; first , second refer arrays in object. if want copy them, then:
var first = theobject.m.slice(); var second = theobject.f.slice();
Comments
Post a Comment