I have two structs:

struct A{
    uint bid;
    mapping(uint => B[]) BMap; //bid - index for struct B


struct B{
    uint cid;

mapping(uint => A[]) AMap;

How can we push and fetch 'cid' in struct B?

Your Answer

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

Browse other questions tagged or ask your own question.