Step for Get Item by Key value
I have a list of object and want to get the item on the basis of id. Ie.
Input :
List = [{id: 1, name: test1}, {id: 2, name: test2}, {id: 3, name: test3} ]
Id = 2
Output :
Item : {id:2, name: test2}
Get Item By Index only work for item index, But I want to Get the item on the basis of Key-value pair. Do you know any step for this ?
Comments
-
You can use the Find First in List step. The step uses a rule that is evaluated against each object in the list and returns the first object where the rule returns true. You can check to see if the id field on the object is equal to a certain value.
For more information, see https://documentation.decisions.com/step-library/docs/en/find-first-in-list
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions