-1

I was investigating how to return the value of a nested property property and there isn't a native way to do it so on this question a user responded with a pretty good implementation.

Then I went on to look up ways of finding all properties with a given value and lastly looking up the value of a property just via the property name even if it's nested

Is there an npm/node.js package which has these kinds of functions built it?

Thanks :)

Community
  • 1
  • 1
lopu
  • 67
  • 7

1 Answers1

0

Take a look to lodash library: https://lodash.com/docs/#get

catacs
  • 191
  • 7
  • Thanks that's basically perfect, haven't checked if they have those other functions but oh well. I'm just gonna use the package instead of including the function on every model I make :) – lopu Apr 23 '17 at 15:31