How to extract .tar.xz to selected folder?

It's simple
tar -xJvf archive-file.tar.xz -C ~/dest/folder/name
Also simple for regular .tar.gz files
tar -xzvf archive-file.tar.gz -C ~/dest/folder/name