Subtracting 2 arrays

i have array [ [1,1], [1,2] ] and [ [ 0,2 ] ] is it possible to subtract array 1 to array 2? that way the results will return [ [ 1, -1], [1, 0] ]

You could do it like this:

There is probably a more concise way using the complex list blocks

For a more general approach

In the case that you have 2 labels to subtract?

list 1
5\n8\n7

list 2
4\n6\n4

result should be:
1\n2\n3

image

Although I doubt it, one day you might get the hang of this :wink:

1 Like

There is no doubt that you are an expert on the subject. TIMAI2

I make it more difficult for you by putting a conditional on the result

For example, if one of the results is 0, the text changes color only for that result, 0.
the others must remain the same color

image

Like this:

image

You need to set the label to htmlContent in the Designer (check the box)

1 Like

perfect
I had not considered it in html