If someone gets you in armbar position you need to roll into it. Learning this needs to take place in a gym, not an internet forum, but I will try and illustrate as best I can…
When your rolling and get caught in a traditional armbar your opponents legs are over your neck/chest area. From this position your opponent is trying to lay you down flat tensing their legs while simultaneously arching their back and using their pelvic bone to push into your elbow. If the hold is sunk in deep your first reaction should not be “get out” it should be to alleviate the pressure on your arm.
You can achieve this by rolling into your opponent and trying to grab (with your free hand) the wrist caught in the armbar, from this position you will be in a crouched/kneeling position and should be able to step over your opponents ass and gain a more dominant position. Once you get to this point not only have you defended against the armbar, but you have also set up a sub of your own.
Since your opponents legs were over you when you started the defense they should be sticking up after putting you in prime position to get a ankle lock after you have successfully defended the armbar and are in the crouching/kneeling position.
I know this should go without saying but doing this unsupervised when you don’t have the proper knowledge is dangerous, especially when performing things like ankle locks. Amateur MMA doesn’t allow ankle locks for a reason… they will destroy your or your opponents knee forever. Just be responsible please.