This question already has an answer here:

How can I decode the 'validFor' data to get back an option in controlling picklist.

for example


Fruits, Vegetables


(Fruits): Apple, Banana, Orange

(Vegetables): Tomato, Eggplant, Potato

let picklistValues = [ { "active": true, "defaultValue": false, "label": "Banana", "validFor": "AAAAAAEA", "value": "Banana" }, ..... ];

marked as duplicate by Lukas Lunow, sfdcfox, battery.cord, glls, crmprogdev Sep 16 at 15:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.