Question

How to check if Row, column or diagonal values are same?

All!

I have a page list structure like below.

"Rows(1)"
{
"Columns(1)"
{
"Value":"1",
},
"Columns(2)"

{
"Value":"2",
},

"Columns(3)"

{
"Value":"3",
},

"Rows(2)"
{
"Columns(1)"
{
"Value":"1",
},
"Columns(2)"

{
"Value":"2",
},

"Columns(3)"

{
"Value":"3",
},

"Rows(3)"
{
"Columns(1)"
{
"Value":"1",
},
"Columns(2)"

{
"Value":"2",
},

"Columns(3)"

{
"Value":"3",
},

I am looking fo help on finding out the values of any row , column or diagonal are the same or not.

Any thoughts?

***Edited by Moderator: Lochan to update platform capability tags***

Comments

Keep up to date on this post and subscribe to comments

August 21, 2019 - 3:08am

Hello, 

I'm not fully sure to understand your question but I don't think you can do anything else than looping on pages to compare.

August 23, 2019 - 11:41am

"Rows(1)"
{
          "Columns(1)"{
                              "Value":"1"},
           "Columns(2)"{
                              "Value":"2",},

           "Columns(3)"{
                             "Value":"3",},

"Rows(2)"
{
          "Columns(1)"{
                              "Value":"1"},
           "Columns(2)"{
                              "Value":"2",},

 

           "Columns(3)"{
                             "Value":"3",},

"Rows(3)"
{
          "Columns(1)"{
                              "Value":"1"},
           "Columns(2)"{
                              "Value":"2",},

           "Columns(3)"{
                             "Value":"3",}

}

My page structure is like above. I need to check if any rows have matching values or any columns have matching values or diagonal cell values are the same. 

Looking for a logic to achieve this.

ex:

                  C1               C2             C3           

Row 1:      1                  2                 2

Row2:       1                  1                 1

Row3:      2                   1                 1