0

Given a group g in Crossfilter, what's the best way to get the value of a particular key k?

0

1 Answer 1

0

The best I can come up with so far is:

g.all().filter(function(item) { return item.key === k; })[0].value;

It works, but seems a bit roundabout.

1
  • 1
    That's correct. It's worth noting that if you assign g.all().filter(function(item) { return item.key === k; })[0] to a variable, it's value property will continue to change as you apply filters to the Crossfilter. Nov 5, 2015 at 23:27

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.