0

I am making a blockchain project using solidity which requires storing various objectIDs corresponding to a personId. The person can add and remove objects and we cannot hard-code the number of objects. I am not being able to use the correct data structure for the same. I have looked for 2d arrays and nested mappings but am unable to figure out.

2
  • 2
    What have you tried? Please share some code to better illustrate what you are trying to do. Dec 28 '20 at 18:38
  • You can use nested mappings.
    – Ismael
    Dec 30 '20 at 1:36
0

I think you can make a struct and then create a mapping with it.

1
  • If you have a concrete example that will make your point more clear.
    – Ismael
    Dec 30 '20 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.