Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the key obtained from "&2" not "rating" #1258

Open
ddy123 opened this issue Jun 4, 2024 · 6 comments
Open

Why is the key obtained from "&2" not "rating" #1258

ddy123 opened this issue Jun 4, 2024 · 6 comments

Comments

@ddy123
Copy link

ddy123 commented Jun 4, 2024

屏幕截图 2024-06-04 165252

The key obtained from "&1" is the "primary" and "quality" key

@gbouget
Copy link

gbouget commented Jun 4, 2024

Why is the key obtained from "&2" not "rating" #1258
Because the node is 3 levels above.

The key obtained from "&1" is the "primary" and "quality" key
Are you sure?

[
  {
    "operation": "shift",
    "spec": {
      "rating": { // &3, three levels above
        "*": { // primary or quality (&2, two levels above)
          "*": { // value (&1, one level above)
            "$": "&3" // &3 starts here and moves up the tree nodes by two levels
          }
        }
      }
    }
  }
]

@ddy123
Copy link
Author

ddy123 commented Jun 4, 2024

屏幕截图 2024-06-04 174328
The key obtained from "&1" is the "primary" and "quality" key
Why are these two different

@ddy123
Copy link
Author

ddy123 commented Jun 4, 2024

Why is the key obtained from "&2" not "rating" #1258
Because the node is 3 levels above.

The key obtained from "&1" is the "primary" and "quality" key
Are you sure?

[
  {
    "operation": "shift",
    "spec": {
      "rating": { // &3, three levels above
        "*": { // primary or quality (&2, two levels above)
          "*": { // value (&1, one level above)
            "$": "&3" // &3 starts here and moves up the tree nodes by two levels
          }
        }
      }
    }
  }
]

Please look above

@gbouget
Copy link

gbouget commented Jun 4, 2024

image

@ddy123
Copy link
Author

ddy123 commented Jun 4, 2024

thanks,I got it.The JSON tree is constructed by the ”spec“,not the "input".
屏幕截图 2024-06-04 214117

@ddy123
Copy link
Author

ddy123 commented Jun 4, 2024

I still got it wrong. It's based on the current layer and iterating upwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants