# The best way to check exists or not the session, key, value of the ini file

**URL:** <https://discourse.nodered.org/t/the-best-way-to-check-exists-or-not-the-session-key-value-of-the-ini-file/33287>\
**Category:** General\
**Created:** [24 September 2020 13:33 UTC](https://discourse.nodered.org/t/the-best-way-to-check-exists-or-not-the-session-key-value-of-the-ini-file/33287 "2020-09-24T13:33:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [24 September 2020 13:33 UTC](https://discourse.nodered.org/t/the-best-way-to-check-exists-or-not-the-session-key-value-of-the-ini-file/33287/1 "2020-09-24T13:33:28Z")

</div>

Hi,  
I would like to check if the `session`, `key`, `value` of an **ini** file exists or not using Node-RED

```auto
[SESSION1]
KEY1=Value1
KEY2=Value2
KEY3=Value3

[SESSION2]
KEY1=Dummy1
KEY2=Dummy2

```

the _session_, _key_ of the **ini** file will be predefined by `chang` node,  
and I used the `ini` node to get the contents of the ini file.

 ![ini-node-1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f12c8983ebac117698e57104109109ea266c300f.png)

After getting the contents of the ini file, **apart from the function button, can combine with any other node?** to check if the _session_, _key_, _value_ of the ini file exist or not? **⇐ what I care about**  
※Purpose combines with other node to minimize code execution in `function` node.

Or to check _session_, _key_, _value_ of the ini file exists or not, the whole all processing must be placed in the `function` node to execute? **⇐ I have done it**

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 November 2020 13:33 UTC](https://discourse.nodered.org/t/the-best-way-to-check-exists-or-not-the-session-key-value-of-the-ini-file/33287/2 "2020-11-23T13:33:50Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
