I'm trying to compare two objects with underscore.
Object 1 (Filter)
{
"tuxedoorsuit":"tuxedoorsuit-tuxedo",
"occasions":"occasions-wedding"
}
Object 2 (Properties)
{
"tuxedoorsuit":"tuxedoorsuit-tuxedo",
"occasions":"occasions-wedding",
"occasions":"occasions-prom",
"product_fit":"product_fit-slim",
"colorfamily":"colorfamily-black"
}
I want to return true when all items of Object 1 are found within Object 2. What would be the best underscore method to use for this?
See Question&Answers more detail:os