I have a Collection of n Number of Objects, in which a field is Boolean, as I could get all the objects that are between two objects that have the field in true: EJ:
$scope.lista = [
{d1:false, d2:Hola0},
{d1:false, d2:Hola1},
{d1:true, d2:Hola2},
{d1:false, d2:Hola3},
{d1:false, d2:Hola4},
{d1:false, d2:Hola5},
{d1:false, d2:Hola6},
{d1:true, d2:Hola7},
{d1:false, d2:Hola8},
{d1:false, d2:Hola9}]
Then I need to recover:
{d1:true, d2:Hola2},
{d1:false, d2:Hola3},
{d1:false, d2:Hola4},
{d1:false, d2:Hola5},
{d1:false, d2:Hola6},
{d1:true, d2:Hola7}
In what way I could do it either in AngularJS or in C # .NET .. I thought I would do it with a couple of validations and extra variables in a for, but I'm looking for something more aesthetic, which I recommend .. Greetings and Thanks !!