# Problem in comparing String in javascript

**URL:** <https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575>\
**Category:** Get Help & Discuss\
**Tags:** rpa, process-studio\
**Created:** [June 8, 2021, 10:37am UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575 "2021-06-08T10:37:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)\
**Post date:** [June 8, 2021, 10:37am UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575/1 "2021-06-08T10:37:58Z")

</div>

Hello,  
I am checking whether the list of **table is present in database or not**. If Present then table exist return **Y** else **N**.  
If it return Y i want to set **status** =“Present” else =“Absent” (see in snapshot).  
I checked the datatype of **result variable** (returns by Table exits) . It is datatype is Object  
so I converted into string using String() function.  
But still unable to compare the two string.  
**Only in this case it is not working**. could you try with this **table exits** and check the result.  
.

 ![error in javascript](https://canada1.discourse-cdn.com/flex027/uploads/automationedge/original/1X/9d923b1ecb8de957d93cbf31f1c9ff4d38f1fcc6.png)

---

<div class="post-metadata">

**Author:** ![fbaldin](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/fbaldin/32/99_2.png) [@fbaldin](https://community.automationedge.com/u/fbaldin)\
**Post date:** [June 8, 2021, 1:02pm UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575/2 "2021-06-08T13:02:32Z")

</div>

I think that if you use the Step **“Filter Row”** you will be able to do this comparison.

---

<div class="post-metadata">

**Author:** ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)\
**Post date:** [June 8, 2021, 1:37pm UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575/3 "2021-06-08T13:37:27Z")

</div>

Sure I will do this with filter row.To avoid the multiple plugin I did this.  
Can you tell me why this is happening?

---

<div class="post-metadata">

**Author:** ![fbaldin](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/fbaldin/32/99_2.png) [@fbaldin](https://community.automationedge.com/u/fbaldin)\
**Post date:** [June 23, 2021, 7:48pm UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575/4 "2021-06-23T19:48:57Z")

</div>

unfrotuanley I don’t know why is happening! 🙂

---

<div class="post-metadata">

**Author:** ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)\
**Post date:** [June 24, 2021, 11:43am UTC](https://community.automationedge.com/t/problem-in-comparing-string-in-javascript/3575/5 "2021-06-24T11:43:28Z")

</div>

Yes ! I’m unable to understand why this is happening?
