# I want to do what "identical" array node does, but not in exact order.

**URL:** <https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170>\
**Category:** Editor Scripting\
**Tags:** arrays, unreal-engine, question\
**Created:** [July 14, 2021, 1:20am UTC](https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170 "2021-07-14T01:20:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NtinosFerret](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ntinosferret/32/984640_2.png) [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Post date:** [July 14, 2021, 1:20am UTC](https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170/1 "2021-07-14T01:20:34Z")

</div>

I have a cooking game. The player adds ingredients to the pot to make a recipe. When enough ingredients are in the pot, a check is made to see if what the player added matches a recipe. Some ingredients may be added more than once. I can check the recipe using the “identical” node but they have to be added in the exact same order the recipe has them. Is there a way to compare if two string arrays contain the same entries regardless of the order?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 14, 2021, 9:01am UTC](https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170/2 "2021-07-14T09:01:58Z")

</div>

You’re not going to get it without a fiddle, I think. The most logical way would be to sort both and then use ‘identical’.

---

<div class="post-metadata">

**Author:** ![NtinosFerret](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ntinosferret/32/984640_2.png) [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Post date:** [July 18, 2021, 6:13am UTC](https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170/3 "2021-07-18T06:13:00Z")

</div>

Indeed it needed a fiddle. I will post my solution soon with photos. I am still testing it. I searched for a way to sort arrays and found that there’s no such thing in the engine. I am using string arrays so I could only sort them alphabetically, but then again that would not suit me because I also keep the recipe’s title in 0.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 18, 2021, 12:41pm UTC](https://forums.unrealengine.com/t/i-want-to-do-what-identical-array-node-does-but-not-in-exact-order/486170/4 "2021-07-18T12:41:10Z")

</div>

There is always:

> **[LE Extended Standard Library in - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/item/f6637ea9663447e4b6a0578216992e70)**
>
> This plugin provides you with blueprints that add general functionality and improvements.
