This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
IPUI.common.base.query.where
IPUI.common.base.query > IPUI.query.where(dataObject, condition)
Return members / key value pairs from specified object / has based upon specified condition criteria
Usage
IPUI.requires('common.base.query');
var myObject = {
1:{
name: 'paul',
gender: 'male',
age: 10
},
2:{
name: 'rosetta',
gender: 'female',
age: 7
},
3:{
name: 'max',
gender: 'unknown',
age: 50
}
};
var newObject = IPUI.query.where(myObject, 'name="paul"');
/*newObject will reflect the where condition of any name key with value of "paul"
{1:{
name: 'paul',
gender: 'male',
age: 10
}};
*/
var newObject = IPUI.query.where(myObject, 'age > 30');
/*newObject will reflect the where condition of any name key with value of "paul"
{1:{
name: 'max',
gender: 'unknown',
age: 50
}};
*/
Expects
| Param | Description |
|---|---|
| Object as Object | The key value / hash / object that is to be sorted |
| Condition as String | The condition that specifies the data query |
| Condition Operators | Description |
|---|---|
| != | Is Not Equal To |
| = | Is Equal To |
| > | Is Greater Than |
| < | Is Less Than |
| is null | Specified Key / Member does not exist |
| is not null | Specified Key / Member does exist |
Returns Object that is the result of the specified condition
Last edited by echai, 4 months ago
Versions:





