assoc
(assoc key list)
In a list of pairs, the first one whose first part is the key (with equal), or nil. It is the way to read a code from an entget list.
(cdr (assoc 8 (entget (entlast)))) ; layer name
(assoc key list)
In a list of pairs, the first one whose first part is the key (with equal), or nil. It is the way to read a code from an entget list.
(cdr (assoc 8 (entget (entlast)))) ; layer name