Replacing a value with a checkmark or cross per row in a table

My goal is to have a table where I look trough one and zero values and replace them with a check mark or a cross depending on the state true or false. I can replace every column with one checkmark or cross, but I cannot let it work per row. How do i fix this? Im using a graphql API.

@DionC Welcome to the community!

Can you post some more information so the forum has more to work with?
Is this for one column or multiple columns?

Thank you. Yes i have a Graphql API request so i can request the shopify order information. I make a request for the paid function so i can show in my table if the order is paid. But request all the orders from one customer. So if a customer had multiple order the paid column can be different for each row. But the only way i can do this is using edges array but then all the columns from all the rows become the same. So how do i make it so that everything can be different depending on the state true or false.

Use a ternary operator in the column itself.
{{self === 'somethinghere'?'truecondition':'falsecondition'}}

Yes but if i use this in the madded value {{['0'].canMarkAsPaid == true ? ":white_check_mark:" : ":x:" }} It shows on all the rows the value of the first because of the [0] array, but i cant remove it because otherwise i get a error.

Not sure I am following:['0'].canMarkAsPaid should be a column in and of itself, no?

Can you share some screenshots//code?

You can also use currentRow if the value is in another column and you want to have a separate column with :white_check_mark: or :x:
{{currentRow.columnNameHere === 'somethinghere'?'truecondition':'falsecondition'}}

This is my query, my response are 3 different orders and they come back to me in an array. So i have to use the [] array function otherwise i get a error in the mapped value. But then all of my rows become the same as the [] one.

Can you paste in the actual response even if you have to replace sensitive data with fake data so long as I can replicate the structure and find a solution for you?

It looks like {{ self == true ? "✅" : "❌" }} could also work here since the mapped value is for the canMarkAsPaid column itself. Otherwise, if you want to keep the same notation you might try {{[i].canMarkAsPaid == true ? "✅" : "❌" }} since i will be replaced by the index of the current row. And I think Scott's suggestion of using {{ currentRow.canMarkAsPaid == true ? "✅" : "❌" }} should work as well!

Can you let us know if any of those three work for you?

Yes, thank you guys. It finnaly worked. currentRow.canMarkAsPaid == true ? ":white_check_mark:" : ":x:" }} this was the one that worked!