I'd like to use pics to easily and quickly create new node shapes. Sadly, I can't find how to use internal nodes to define anchors. For instance, I'd like the B to point to the small x in the ground symbol:

[![enter image description here](https://i.stack.imgur.com/7LdDo.png)](https://i.stack.imgur.com/7LdDo.png)

MWE:

```
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\begin{document}

\tikzset{
  groundpic/.pic={
    % Code for the ground
    \draw[line width=.4pt]
    (0,0) -- (1mm,0)
    -- +(0,1mm) -- +(0,-1mm)
    ++(.4mm,0)
    -- +(0,.7mm) -- +(0,-.7mm) node[anchor=center,scale=.5,name=myanchor] {x}
    ++(.4mm,0)
    -- +(0,.35mm) -- +(0,-.35mm)
    ;
  },
  ground/.style={
    shape=coordinate, % Otherwise the arrow will not point to the center
    append after command={
      pic[scale=2] {groundpic}
    },
  },
}

Goal: add an arrow to x, but end anchor=myanchor fails:
\noindent\begin{tikzcd}
  A \rar & |[ground]| & \\
  B \ar[
    ru,
    % end anchor=myanchor
  ]
\end{tikzcd}

\end{document}

```