I am trying to sort a Multi-dimensional array returned from my API to allow people to choose a range based on beats.
To be honest i really stuck my api returns.
var myObj = [{
    title: 'title one',
    beats: 1
}, {
    title: 'title two',
    beats: 2
}, {
    title: 'title three',
    beats: 3
}, {
    title: 'title four',
    beats: 4
}, {
    title: 'title five',
    beats: 5
}, {
    title: 'title six',
    beats: 6
}, {
    title: 'title seven',
    beats: 7
}, {
    title: 'title eight',
    beats: 8
}, {
    title: 'title nine',
    beats: 9
}, {
    title: 'title ten',
    beats: 10
}];
Now i am trying to allow users to select a range based on beats.
so if they select 1-4 it would return.
var myObj = [{
    title: 'title one',
    beats: 1
}, {
    title: 'title two',
    beats: 2
}, {
    title: 'title three',
    beats: 3
}];
and 8-10 would return etc etc...
var myObj = [{
    title: 'title eight',
    beats: 8
}, {
    title: 'title nine',
    beats: 9
}, {
    title: 'title ten',
    beats: 10
}];
What function would i use to do this would appreciate any help on this?
 
     
     
     
    