How to compare two dictionaries?

Hi koders!
I want to know if there is a way to compare two dicionaries.
I want to compare a dictionary saved in Firebase database with another one in Tiny_db and if they are different, the one of Firebase replaces the one in Tiny_db.
I have used the logic block “not equal to” but it always returns true (the dictionaries are different) but they are not.


Any idea?
Thanks in advance!

1 Like

Convert Both The Dictionaries To List Of Pairs,
dictionaries_dict_to_alist

Then Compare Those 2 Lists With Help Of Compare Block Of ListAddon Extension;
component_method

And Make Sure To Use This :point_down: Block From The Same ListAddon Extension To Sort The Converted Lists If You Doubt There Can Be Issue With Order Of Pairs In Dictionaries.
component_method (1)

3 Likes

I’ll try that
Thanks!

1 Like

Worked nice and sweet! Thanks!

1 Like

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